diff options
Diffstat (limited to 'lldb/source/Plugins')
46 files changed, 251 insertions, 251 deletions
diff --git a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp index 0f82341e6d3..ed86db1fc46 100644 --- a/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp +++ b/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp @@ -318,7 +318,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); if (log) - log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%llx\n func_addr = 0x%llx\n return_addr = 0x%llx\n arg1_ptr = %p (0x%llx)\n arg2_ptr = %p (0x%llx)\n arg3_ptr = %p (0x%llx)\n)", + log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%" PRIx64 "\n func_addr = 0x%" PRIx64 "\n return_addr = 0x%" PRIx64 "\n arg1_ptr = %p (0x%" PRIx64 ")\n arg2_ptr = %p (0x%" PRIx64 ")\n arg3_ptr = %p (0x%" PRIx64 ")\n)", (void*)&thread, (uint64_t)sp, (uint64_t)func_addr, @@ -336,7 +336,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, { reg_info = reg_ctx->GetRegisterInfoByName("rdi", 0); if (log) - log->Printf("About to write arg1 (0x%llx) into %s", (uint64_t)*arg1_ptr, reg_info->name); + log->Printf("About to write arg1 (0x%" PRIx64 ") into %s", (uint64_t)*arg1_ptr, reg_info->name); if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg1_ptr)) return false; @@ -345,7 +345,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, { reg_info = reg_ctx->GetRegisterInfoByName("rsi", 0); if (log) - log->Printf("About to write arg2 (0x%llx) into %s", (uint64_t)*arg2_ptr, reg_info->name); + log->Printf("About to write arg2 (0x%" PRIx64 ") into %s", (uint64_t)*arg2_ptr, reg_info->name); if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg2_ptr)) return false; @@ -353,7 +353,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, { reg_info = reg_ctx->GetRegisterInfoByName("rdx", 0); if (log) - log->Printf("About to write arg3 (0x%llx) into %s", (uint64_t)*arg3_ptr, reg_info->name); + log->Printf("About to write arg3 (0x%" PRIx64 ") into %s", (uint64_t)*arg3_ptr, reg_info->name); if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg3_ptr)) return false; @@ -361,7 +361,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, { reg_info = reg_ctx->GetRegisterInfoByName("rcx", 0); if (log) - log->Printf("About to write arg4 (0x%llx) into %s", (uint64_t)*arg4_ptr, reg_info->name); + log->Printf("About to write arg4 (0x%" PRIx64 ") into %s", (uint64_t)*arg4_ptr, reg_info->name); if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg4_ptr)) return false; @@ -369,7 +369,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, { reg_info = reg_ctx->GetRegisterInfoByName("r8", 0); if (log) - log->Printf("About to write arg5 (0x%llx) into %s", (uint64_t)*arg5_ptr, reg_info->name); + log->Printf("About to write arg5 (0x%" PRIx64 ") into %s", (uint64_t)*arg5_ptr, reg_info->name); if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg5_ptr)) return false; @@ -377,7 +377,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, { reg_info = reg_ctx->GetRegisterInfoByName("r9", 0); if (log) - log->Printf("About to write arg6 (0x%llx) into %s", (uint64_t)*arg6_ptr, reg_info->name); + log->Printf("About to write arg6 (0x%" PRIx64 ") into %s", (uint64_t)*arg6_ptr, reg_info->name); if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg6_ptr)) return false; } @@ -391,7 +391,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, // First, align the SP if (log) - log->Printf("16-byte aligning SP: 0x%llx to 0x%llx", (uint64_t)sp, (uint64_t)(sp & ~0xfull)); + log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64, (uint64_t)sp, (uint64_t)(sp & ~0xfull)); sp &= ~(0xfull); // 16-byte alignment @@ -402,7 +402,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, reg_value.SetUInt64 (return_addr); if (log) - log->Printf("Pushing the return address onto the stack: new SP 0x%llx, return address 0x%llx", (uint64_t)sp, (uint64_t)return_addr); + log->Printf("Pushing the return address onto the stack: new SP 0x%" PRIx64 ", return address 0x%" PRIx64, (uint64_t)sp, (uint64_t)return_addr); const RegisterInfo *pc_reg_info = reg_ctx->GetRegisterInfoByName("rip"); Error error (reg_ctx->WriteRegisterValueToMemory(pc_reg_info, sp, pc_reg_info->byte_size, reg_value)); @@ -412,7 +412,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, // %rsp is set to the actual stack value. if (log) - log->Printf("Writing SP (0x%llx) down", (uint64_t)sp); + log->Printf("Writing SP (0x%" PRIx64 ") down", (uint64_t)sp); if (!reg_ctx->WriteRegisterFromUnsigned (reg_ctx->GetRegisterInfoByName("rsp"), sp)) return false; @@ -420,7 +420,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread, // %rip is set to the address of the called function. if (log) - log->Printf("Writing new IP (0x%llx) down", (uint64_t)func_addr); + log->Printf("Writing new IP (0x%" PRIx64 ") down", (uint64_t)func_addr); if (!reg_ctx->WriteRegisterFromUnsigned (pc_reg_info, func_addr)) return false; diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp index 378d9c5638a..0c313571ced 100644 --- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp +++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVM.cpp @@ -232,7 +232,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex if (!EDEvaluateOperand(&operand_value, operand, IPRegisterReader, &rra)) { - comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value); + comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value); AddSymbolicInfo (exe_ctx, comment, operand_value, GetAddress()); } } @@ -257,7 +257,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex { uint64_t operand_value = PC + atoi(++pos); // Put the address value into the operands. - comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value); + comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value); AddSymbolicInfo (exe_ctx, comment, operand_value, GetAddress()); } } @@ -278,7 +278,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex } uint64_t operand_value = PC + atoi(++pos); // Put the address value into the comment. - comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value); + comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value); // And the original token string into the operands. // llvm::StringRef Str(pos - 1); // RStrip(Str, '\n'); diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp index f44465c7ccb..7522a1ced16 100644 --- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp +++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp @@ -271,7 +271,7 @@ public: const uint64_t uval64 = data.GetU64(&offset); m_opcode.SetOpcode64(uval64); m_opcode_name.assign (".quad"); - mnemonic_strm.Printf("0x%16.16llx", uval64); + mnemonic_strm.Printf("0x%16.16" PRIx64, uval64); } break; default: @@ -644,7 +644,7 @@ const char *DisassemblerLLVMC::SymbolLookup (uint64_t value, m_inst->AppendComment(ss.GetString()); } } - //printf ("DisassemblerLLVMC::SymbolLookup (value=0x%16.16llx, type=%llu, pc=0x%16.16llx, name=\"%s\") m_exe_ctx=%p, m_inst=%p\n", value, *type_ptr, pc, remove_this_prior_to_checkin.c_str(), m_exe_ctx, m_inst); + //printf ("DisassemblerLLVMC::SymbolLookup (value=0x%16.16" PRIx64 ", type=%" PRIu64 ", pc=0x%16.16" PRIx64 ", name=\"%s\") m_exe_ctx=%p, m_inst=%p\n", value, *type_ptr, pc, remove_this_prior_to_checkin.c_str(), m_exe_ctx, m_inst); } } diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 194f21e0067..f88f2c95815 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -402,7 +402,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule ( { char uuidbuf[64]; s->Printf ("Kernel UUID: %s\n", module_sp->GetUUID().GetAsCString(uuidbuf, sizeof (uuidbuf))); - s->Printf ("Load Address: 0x%llx\n", address); + s->Printf ("Load Address: 0x%" PRIx64 "\n", address); if (module_sp->GetFileSpec().GetDirectory().IsEmpty()) { s->Printf ("Loaded kernel file %s\n", module_sp->GetFileSpec().GetFilename().AsCString()); @@ -723,7 +723,7 @@ DynamicLoaderDarwinKernel::ReadKextSummaries (const Address &kext_summary_addr, { image_infos[i].reference_list = 0; } -// printf ("[%3u] %*.*s: address=0x%16.16llx, size=0x%16.16llx, version=0x%16.16llx, load_tag=0x%8.8x, flags=0x%8.8x\n", +// printf ("[%3u] %*.*s: address=0x%16.16" PRIx64 ", size=0x%16.16" PRIx64 ", version=0x%16.16" PRIx64 ", load_tag=0x%8.8x, flags=0x%8.8x\n", // i, // KERNEL_MODULE_MAX_NAME, KERNEL_MODULE_MAX_NAME, (char *)name_data, // image_infos[i].address, @@ -793,7 +793,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::PutToLog (Log *log) const { if (u) { - log->Printf("\taddr=0x%16.16llx size=0x%16.16llx version=0x%16.16llx load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\"", + log->Printf("\taddr=0x%16.16" PRIx64 " size=0x%16.16" PRIx64 " version=0x%16.16" PRIx64 " load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\"", address, size, version, load_tag, flags, reference_list, u[ 0], u[ 1], u[ 2], u[ 3], u[ 4], u[ 5], u[ 6], u[ 7], u[ 8], u[ 9], u[10], u[11], u[12], u[13], u[14], u[15], @@ -801,7 +801,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::PutToLog (Log *log) const } else { - log->Printf("\t[0x%16.16llx - 0x%16.16llx) version=0x%16.16llx load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16llx name=\"%s\"", + log->Printf("\t[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ") version=0x%16.16" PRIx64 " load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16" PRIx64 " name=\"%s\"", address, address+size, version, load_tag, flags, reference_list, name); } @@ -819,7 +819,7 @@ DynamicLoaderDarwinKernel::PutToLog(Log *log) const return; Mutex::Locker locker(m_mutex); - log->Printf("gLoadedKextSummaries = 0x%16.16llx { version=%u, entry_size=%u, entry_count=%u }", + log->Printf("gLoadedKextSummaries = 0x%16.16" PRIx64 " { version=%u, entry_size=%u, entry_count=%u }", m_kext_summary_header_addr.GetFileAddress(), m_kext_summary_header.version, m_kext_summary_header.entry_size, diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index 4723da8b184..466e6643a18 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -469,7 +469,7 @@ DynamicLoaderMacOSXDYLD::UpdateImageLoadAddress (Module *module, DYLDImageInfo& else { Host::SystemLog (Host::eSystemLogWarning, - "warning: unable to find and load segment named '%s' at 0x%llx in '%s/%s' in macosx dynamic loader plug-in.\n", + "warning: unable to find and load segment named '%s' at 0x%" PRIx64 " in '%s/%s' in macosx dynamic loader plug-in.\n", info.segments[i].name.AsCString("<invalid>"), (uint64_t)new_section_load_addr, image_object_file->GetFileSpec().GetDirectory().AsCString(), @@ -795,7 +795,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfos (DYLDImageInfo::collection &i { if (log) { - log->Printf ("Adding new image at address=0x%16.16llx.", image_infos[idx].address); + log->Printf ("Adding new image at address=0x%16.16" PRIx64 ".", image_infos[idx].address); image_infos[idx].PutToLog (log.get()); } @@ -907,7 +907,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image { if (log) { - log->Printf ("Removing module at address=0x%16.16llx.", image_infos[idx].address); + log->Printf ("Removing module at address=0x%16.16" PRIx64 ".", image_infos[idx].address); image_infos[idx].PutToLog (log.get()); } @@ -1376,12 +1376,12 @@ DynamicLoaderMacOSXDYLD::Segment::PutToLog (Log *log, lldb::addr_t slide) const if (log) { if (slide == 0) - log->Printf ("\t\t%16s [0x%16.16llx - 0x%16.16llx)", + log->Printf ("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")", name.AsCString(""), vmaddr + slide, vmaddr + slide + vmsize); else - log->Printf ("\t\t%16s [0x%16.16llx - 0x%16.16llx) slide = 0x%llx", + log->Printf ("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ") slide = 0x%" PRIx64, name.AsCString(""), vmaddr + slide, vmaddr + slide + vmsize, @@ -1416,7 +1416,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const { if (u) { - log->Printf("\t modtime=0x%8.8llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s' (UNLOADED)", + log->Printf("\t modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s' (UNLOADED)", mod_date, u[ 0], u[ 1], u[ 2], u[ 3], u[ 4], u[ 5], u[ 6], u[ 7], @@ -1426,7 +1426,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const file_spec.GetFilename().AsCString()); } else - log->Printf("\t modtime=0x%8.8llx path='%s/%s' (UNLOADED)", + log->Printf("\t modtime=0x%8.8" PRIx64 " path='%s/%s' (UNLOADED)", mod_date, file_spec.GetDirectory().AsCString(), file_spec.GetFilename().AsCString()); @@ -1435,7 +1435,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const { if (u) { - log->Printf("\taddress=0x%16.16llx modtime=0x%8.8llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s'", + log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s'", address, mod_date, u[ 0], u[ 1], u[ 2], u[ 3], @@ -1447,7 +1447,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const } else { - log->Printf("\taddress=0x%16.16llx modtime=0x%8.8llx path='%s/%s'", + log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " path='%s/%s'", address, mod_date, file_spec.GetDirectory().AsCString(), @@ -1470,7 +1470,7 @@ DynamicLoaderMacOSXDYLD::PutToLog(Log *log) const return; Mutex::Locker locker(m_mutex); - log->Printf("dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8llx, notify=0x%8.8llx }", + log->Printf("dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8" PRIx64 ", notify=0x%8.8" PRIx64 " }", m_dyld_all_image_infos.version, m_dyld_all_image_infos.dylib_info_count, (uint64_t)m_dyld_all_image_infos.dylib_info_addr, diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp index 7f41cfac580..bb3db11663b 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp @@ -113,7 +113,7 @@ AuxVector::DumpToLog(LogSP log) const log->PutCString("AuxVector: "); for (iterator I = begin(); I != end(); ++I) { - log->Printf(" %s [%llu]: %llx", GetEntryName(*I), I->type, I->value); + log->Printf(" %s [%" PRIu64 "]: %" PRIx64, GetEntryName(*I), I->type, I->value); } } diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp index 404f4b1927b..6b9b8d6baa2 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp @@ -303,11 +303,11 @@ DYLDRendezvous::DumpToLog(LogSP log) const return; log->PutCString("DYLDRendezvous:"); - log->Printf(" Address: %llx", GetRendezvousAddress()); + log->Printf(" Address: %" PRIx64, GetRendezvousAddress()); log->Printf(" Version: %d", GetVersion()); - log->Printf(" Link : %llx", GetLinkMapAddress()); - log->Printf(" Break : %llx", GetBreakAddress()); - log->Printf(" LDBase : %llx", GetLDBase()); + log->Printf(" Link : %" PRIx64, GetLinkMapAddress()); + log->Printf(" Break : %" PRIx64, GetBreakAddress()); + log->Printf(" LDBase : %" PRIx64, GetLDBase()); log->Printf(" State : %s", (state == eConsistent) ? "consistent" : (state == eAdd) ? "add" : @@ -322,10 +322,10 @@ DYLDRendezvous::DumpToLog(LogSP log) const for (int i = 1; I != E; ++I, ++i) { log->Printf("\n SOEntry [%d] %s", i, I->path.c_str()); - log->Printf(" Base : %llx", I->base_addr); - log->Printf(" Path : %llx", I->path_addr); - log->Printf(" Dyn : %llx", I->dyn_addr); - log->Printf(" Next : %llx", I->next); - log->Printf(" Prev : %llx", I->prev); + log->Printf(" Base : %" PRIx64, I->base_addr); + log->Printf(" Path : %" PRIx64, I->path_addr); + log->Printf(" Dyn : %" PRIx64, I->dyn_addr); + log->Printf(" Next : %" PRIx64, I->next); + log->Printf(" Prev : %" PRIx64, I->prev); } } diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp index aaa3cd34f77..44b8468428c 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -111,7 +111,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, { LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) - log->Printf ("0x%16.16llx: static-type = '%s' has vtable symbol '%s'\n", + log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has vtable symbol '%s'\n", original_ptr, in_value.GetTypeName().GetCString(), name); @@ -149,14 +149,14 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, if (num_matches == 0) { if (log) - log->Printf("0x%16.16llx: is not dynamic\n", original_ptr); + log->Printf("0x%16.16" PRIx64 ": is not dynamic\n", original_ptr); return false; } if (num_matches == 1) { type_sp = class_types.GetTypeAtIndex(0); if (log) - log->Printf ("0x%16.16llx: static-type = '%s' has dynamic type: uid={0x%llx}, type-name='%s'\n", + log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has dynamic type: uid={0x%" PRIx64 "}, type-name='%s'\n", original_ptr, in_value.GetTypeName().AsCString(), type_sp->GetID(), @@ -175,7 +175,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, if (type_sp) { if (log) - log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types: uid={0x%llx}, type-name='%s'\n", + log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types: uid={0x%" PRIx64 "}, type-name='%s'\n", original_ptr, in_value.GetTypeName().AsCString(), type_sp->GetID(), @@ -192,7 +192,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, if (ClangASTContext::IsCXXClassType(type_sp->GetClangFullType())) { if (log) - log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types, picking this one: uid={0x%llx}, type-name='%s'\n", + log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types, picking this one: uid={0x%" PRIx64 "}, type-name='%s'\n", original_ptr, in_value.GetTypeName().AsCString(), type_sp->GetID(), @@ -206,7 +206,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, if (i == num_matches) { if (log) - log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types, didn't find a C++ match\n", + log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types, didn't find a C++ match\n", original_ptr, in_value.GetTypeName().AsCString()); return false; diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp index 10b2602c7cf..f81b75ec154 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp @@ -413,7 +413,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded() ClassDescriptorSP descriptor_sp (new ClassDescriptorV1(isa, process_sp)); if (log && log->GetVerbose()) - log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%llx from _objc_debug_class_hash to isa->descriptor cache", isa); + log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64 " from _objc_debug_class_hash to isa->descriptor cache", isa); m_isa_to_descriptor_cache[isa] = descriptor_sp; } @@ -435,7 +435,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded() ClassDescriptorSP descriptor_sp (new ClassDescriptorV1(isa, process_sp)); if (log && log->GetVerbose()) - log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%llx from _objc_debug_class_hash to isa->descriptor cache", isa); + log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64 " from _objc_debug_class_hash to isa->descriptor cache", isa); m_isa_to_descriptor_cache[isa] = descriptor_sp; } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 9fb6f4e7ab5..fa34407644b 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -1800,7 +1800,7 @@ AppleObjCRuntimeV2::GetClassDescriptor (ValueObject& valobj) { lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS)); if (log) - log->Printf("0x%llx: AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%llx", + log->Printf("0x%" PRIx64 ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%" PRIx64, isa_pointer, isa); } @@ -1875,7 +1875,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded() ClassDescriptorSP descriptor_sp = ClassDescriptorSP(new ClassDescriptorV2(*this, elt.second)); if (log && log->GetVerbose()) - log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%llx (%s) from dynamic table to isa->descriptor cache", elt.second, elt.first.AsCString()); + log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64 " (%s) from dynamic table to isa->descriptor cache", elt.second, elt.first.AsCString()); m_isa_to_descriptor_cache[elt.second] = descriptor_sp; } @@ -1915,7 +1915,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded() ClassDescriptorSP descriptor_sp = ClassDescriptorSP(new ClassDescriptorV2(*this, objc_isa)); if (log && log->GetVerbose()) - log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%llx (%s) from static table to isa->descriptor cache", objc_isa, descriptor_sp->GetClassName().AsCString()); + log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64 " (%s) from static table to isa->descriptor cache", objc_isa, descriptor_sp->GetClassName().AsCString()); m_isa_to_descriptor_cache[objc_isa] = descriptor_sp; } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp index 25a2bfa4f7f..52c9eade773 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp @@ -301,13 +301,13 @@ AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::AddressInRegion (lld void AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::Dump (Stream &s) { - s.Printf ("Header addr: 0x%llx Code start: 0x%llx Code End: 0x%llx Next: 0x%llx\n", + s.Printf ("Header addr: 0x%" PRIx64 " Code start: 0x%" PRIx64 " Code End: 0x%" PRIx64 " Next: 0x%" PRIx64 "\n", m_header_addr, m_code_start_addr, m_code_end_addr, m_next_region); size_t num_elements = m_descriptors.size(); for (size_t i = 0; i < num_elements; i++) { s.Indent(); - s.Printf ("Code start: 0x%llx Flags: %d\n", m_descriptors[i].code_start, m_descriptors[i].flags); + s.Printf ("Code start: 0x%" PRIx64 " Flags: %d\n", m_descriptors[i].code_start, m_descriptors[i].flags); } } @@ -616,7 +616,7 @@ AppleObjCTrampolineHandler::SetupDispatchFunction (Thread &thread, ValueList &di impl_code_address = sc.symbol->GetAddress(); //lldb::addr_t addr = impl_code_address.GetOpcodeLoadAddress (exe_ctx.GetTargetPtr()); - //printf ("Getting address for our_utility_function: 0x%llx.\n", addr); + //printf ("Getting address for our_utility_function: 0x%" PRIx64 ".\n", addr); } else { @@ -882,7 +882,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto { if (log) { - log->Printf("Resolving call for class - 0x%llx and selector - 0x%llx", + log->Printf("Resolving call for class - 0x%" PRIx64 " and selector - 0x%" PRIx64, isa_addr, sel_addr); } ObjCLanguageRuntime *objc_runtime = m_process_sp->GetObjCLanguageRuntime (); @@ -896,7 +896,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto // Yup, it was in the cache, so we can run to that address directly. if (log) - log->Printf ("Found implementation address in cache: 0x%llx", impl_addr); + log->Printf ("Found implementation address in cache: 0x%" PRIx64, impl_addr); ret_plan_sp.reset (new ThreadPlanRunToAddress (thread, impl_addr, stop_others)); } diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp index 4e2280a038b..bdbcf091da7 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp @@ -627,7 +627,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name, if (metadata) isa_value = metadata->GetISAPtr(); - log->Printf("AOCTV::FT [%u] Found %s (isa 0x%llx) in the ASTContext", + log->Printf("AOCTV::FT [%u] Found %s (isa 0x%" PRIx64 ") in the ASTContext", current_id, dumper.GetCString(), isa_value); @@ -670,7 +670,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name, if (!iface_decl) { if (log) - log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for isa 0x%llx", + log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for isa 0x%" PRIx64, current_id, (uint64_t)isa); @@ -682,7 +682,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name, if (log) { ASTDumper dumper(new_iface_type); - log->Printf("AOCTV::FT [%u] Created %s (isa 0x%llx)", + log->Printf("AOCTV::FT [%u] Created %s (isa 0x%" PRIx64 ")", current_id, dumper.GetCString(), (uint64_t)isa); diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp index 7ffac108ebe..3b778e83383 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp @@ -108,8 +108,8 @@ AppleThreadPlanStepThroughObjCTrampoline::GetDescription (Stream *s, s->Printf("Step through ObjC trampoline"); else { - s->Printf ("Stepping to implementation of ObjC method - obj: 0x%llx, isa: 0x%llx, sel: 0x%llx", - m_input_values.GetValueAtIndex(0)->GetScalar().ULongLong(), m_isa_addr, m_sel_addr); + s->Printf ("Stepping to implementation of ObjC method - obj: 0x%llx, isa: 0x%" PRIx64 ", sel: 0x%" PRIx64, + m_input_values.GetValueAtIndex(0)->GetScalar().ULongLong(), m_isa_addr, m_sel_addr); } } @@ -178,7 +178,7 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr) if (m_trampoline_handler->AddrIsMsgForward(target_addr)) { if (log) - log->Printf ("Implementation lookup returned msgForward function: 0x%llx, stopping.", target_addr); + log->Printf ("Implementation lookup returned msgForward function: 0x%" PRIx64 ", stopping.", target_addr); SymbolContext sc = m_thread.GetStackFrameAtIndex(0)->GetSymbolContext(eSymbolContextEverything); m_run_to_sp.reset(new ThreadPlanStepOut (m_thread, @@ -194,13 +194,13 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr) } if (log) - log->Printf("Running to ObjC method implementation: 0x%llx", target_addr); + log->Printf("Running to ObjC method implementation: 0x%" PRIx64, target_addr); ObjCLanguageRuntime *objc_runtime = GetThread().GetProcess()->GetObjCLanguageRuntime(); assert (objc_runtime != NULL); objc_runtime->AddToMethodCache (m_isa_addr, m_sel_addr, target_addr); if (log) - log->Printf("Adding {isa-addr=0x%llx, sel-addr=0x%llx} = addr=0x%llx to cache.", m_isa_addr, m_sel_addr, target_addr); + log->Printf("Adding {isa-addr=0x%" PRIx64 ", sel-addr=0x%" PRIx64 "} = addr=0x%" PRIx64 " to cache.", m_isa_addr, m_sel_addr, target_addr); // Extract the target address from the value: diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 399578558c0..08748f70b08 100644 --- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -273,7 +273,7 @@ ObjectContainerBSDArchive::CreateInstance if (file && data_sp && ObjectContainerBSDArchive::MagicBytesMatch(data)) { Timer scoped_timer (__PRETTY_FUNCTION__, - "ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8llx, file_size = 0x%8.8llx)", + "ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8" PRIx64 ", file_size = 0x%8.8" PRIx64 ")", module_sp->GetFileSpec().GetDirectory().AsCString(), module_sp->GetFileSpec().GetFilename().AsCString(), file, (uint64_t) offset, (uint64_t) length); diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index f1a502747de..e357aff0e64 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1186,9 +1186,9 @@ ObjectFileELF::DumpELFHeader(Stream *s, const ELFHeader &header) DumpELFHeader_e_type(s, header.e_type); s->Printf("\ne_machine = 0x%4.4x\n", header.e_machine); s->Printf("e_version = 0x%8.8x\n", header.e_version); - s->Printf("e_entry = 0x%8.8llx\n", header.e_entry); - s->Printf("e_phoff = 0x%8.8llx\n", header.e_phoff); - s->Printf("e_shoff = 0x%8.8llx\n", header.e_shoff); + s->Printf("e_entry = 0x%8.8" PRIx64 "\n", header.e_entry); + s->Printf("e_phoff = 0x%8.8" PRIx64 "\n", header.e_phoff); + s->Printf("e_shoff = 0x%8.8" PRIx64 "\n", header.e_shoff); s->Printf("e_flags = 0x%8.8x\n", header.e_flags); s->Printf("e_ehsize = 0x%4.4x\n", header.e_ehsize); s->Printf("e_phentsize = 0x%4.4x\n", header.e_phentsize); @@ -1246,11 +1246,11 @@ void ObjectFileELF::DumpELFProgramHeader(Stream *s, const ELFProgramHeader &ph) { DumpELFProgramHeader_p_type(s, ph.p_type); - s->Printf(" %8.8llx %8.8llx %8.8llx", ph.p_offset, ph.p_vaddr, ph.p_paddr); - s->Printf(" %8.8llx %8.8llx %8.8x (", ph.p_filesz, ph.p_memsz, ph.p_flags); + s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, ph.p_offset, ph.p_vaddr, ph.p_paddr); + s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8x (", ph.p_filesz, ph.p_memsz, ph.p_flags); DumpELFProgramHeader_p_flags(s, ph.p_flags); - s->Printf(") %8.8llx", ph.p_align); + s->Printf(") %8.8" PRIx64, ph.p_align); } //---------------------------------------------------------------------- @@ -1331,11 +1331,11 @@ ObjectFileELF::DumpELFSectionHeader(Stream *s, const ELFSectionHeader &sh) { s->Printf("%8.8x ", sh.sh_name); DumpELFSectionHeader_sh_type(s, sh.sh_type); - s->Printf(" %8.8llx (", sh.sh_flags); + s->Printf(" %8.8" PRIx64 " (", sh.sh_flags); DumpELFSectionHeader_sh_flags(s, sh.sh_flags); - s->Printf(") %8.8llx %8.8llx %8.8llx", sh.sh_addr, sh.sh_offset, sh.sh_size); + s->Printf(") %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addr, sh.sh_offset, sh.sh_size); s->Printf(" %8.8x %8.8x", sh.sh_link, sh.sh_info); - s->Printf(" %8.8llx %8.8llx", sh.sh_addralign, sh.sh_entsize); + s->Printf(" %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addralign, sh.sh_entsize); } //---------------------------------------------------------------------- diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 0881fa3018c..8447a88d1dc 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -787,7 +787,7 @@ ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s, const coff_opt_header_t& header) s->Printf (" entry = 0x%8.8x\n", header.entry); s->Printf (" code_offset = 0x%8.8x\n", header.code_offset); s->Printf (" data_offset = 0x%8.8x\n", header.data_offset); - s->Printf (" image_base = 0x%16.16llx\n", header.image_base); + s->Printf (" image_base = 0x%16.16" PRIx64 "\n", header.image_base); s->Printf (" sect_alignment = 0x%8.8x\n", header.sect_alignment); s->Printf (" file_alignment = 0x%8.8x\n", header.file_alignment); s->Printf (" major_os_system_version = 0x%4.4x\n", header.major_os_system_version); @@ -802,10 +802,10 @@ ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s, const coff_opt_header_t& header) s->Printf (" checksum = 0x%8.8x\n", header.checksum); s->Printf (" subsystem = 0x%4.4x\n", header.subsystem); s->Printf (" dll_flags = 0x%4.4x\n", header.dll_flags); - s->Printf (" stack_reserve_size = 0x%16.16llx\n", header.stack_reserve_size); - s->Printf (" stack_commit_size = 0x%16.16llx\n", header.stack_commit_size); - s->Printf (" heap_reserve_size = 0x%16.16llx\n", header.heap_reserve_size); - s->Printf (" heap_commit_size = 0x%16.16llx\n", header.heap_commit_size); + s->Printf (" stack_reserve_size = 0x%16.16" PRIx64 "\n", header.stack_reserve_size); + s->Printf (" stack_commit_size = 0x%16.16" PRIx64 "\n", header.stack_commit_size); + s->Printf (" heap_reserve_size = 0x%16.16" PRIx64 "\n", header.heap_reserve_size); + s->Printf (" heap_commit_size = 0x%16.16" PRIx64 "\n", header.heap_commit_size); s->Printf (" loader_flags = 0x%8.8x\n", header.loader_flags); s->Printf (" num_data_dir_entries = 0x%8.8zx\n", header.data_dirs.size()); uint32_t i; diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index b7a0bb929cc..ca00a63a053 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -133,7 +133,7 @@ OperatingSystemPython::GetDynamicRegisterInfo () LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) - log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %llu", m_process->GetID()); + log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %" PRIu64, m_process->GetID()); auto object_sp = m_interpreter->OSPlugin_QueryForRegisterInfo(m_interpreter->MakeScriptObject(m_python_object)); if (!object_sp) @@ -180,7 +180,7 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, ThreadList LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) - log->Printf ("OperatingSystemPython::UpdateThreadList() fetching thread data from python for pid %llu", m_process->GetID()); + log->Printf ("OperatingSystemPython::UpdateThreadList() fetching thread data from python for pid %" PRIu64, m_process->GetID()); auto object_sp = m_interpreter->OSPlugin_QueryForThreadsInfo(m_interpreter->MakeScriptObject(m_python_object)); if (!object_sp) @@ -255,7 +255,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, lldb::add // The registers data is in contiguous memory, just create the register // context using the address provided if (log) - log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%llx, reg_data_addr = 0x%llx) creating memory register context", thread->GetID(), reg_data_addr); + log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64 ") creating memory register context", thread->GetID(), reg_data_addr); reg_ctx_sp.reset (new RegisterContextMemory (*thread, 0, *GetDynamicRegisterInfo (), reg_data_addr)); } else @@ -263,7 +263,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, lldb::add // No register data address is provided, query the python plug-in to let // it make up the data as it sees fit if (log) - log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%llx) fetching register data from python", thread->GetID()); + log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%" PRIx64 ") fetching register data from python", thread->GetID()); auto object_sp = m_interpreter->OSPlugin_QueryForRegisterContextData (m_interpreter->MakeScriptObject(m_python_object), thread->GetID()); diff --git a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp index 0c645f3645d..6a766d7ceb1 100644 --- a/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/ProcessLinux.cpp @@ -99,7 +99,7 @@ ProcessLinux::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre { LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("ProcessLinux::%s() (pid = %i)", __FUNCTION__, GetID()); + log->Printf ("ProcessLinux::%s() (pid = %" PRIu64 ")", __FUNCTION__, GetID()); // Update the process thread list with this new thread. // FIXME: We should be using tid, not pid. @@ -110,7 +110,7 @@ ProcessLinux::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre } if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("ProcessLinux::%s() updated pid = %i", __FUNCTION__, GetID()); + log->Printf ("ProcessLinux::%s() updated pid = %" PRIu64, __FUNCTION__, GetID()); new_thread_list.AddThread(thread_sp); return new_thread_list.GetSize(false) > 0; diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp index 7e4aeea954d..9f661cd3b3b 100644 --- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp +++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp @@ -177,7 +177,7 @@ DoReadMemory(lldb::pid_t pid, if (log) ProcessPOSIXLog::IncNestLevel(); if (log && ProcessPOSIXLog::AtTopNestLevel() && log->GetMask().Test(POSIX_LOG_MEMORY)) - log->Printf ("ProcessMonitor::%s(%d, %d, %p, %p, %d, _)", __FUNCTION__, + log->Printf ("ProcessMonitor::%s(%" PRIu64 ", %d, %p, %p, %zd, _)", __FUNCTION__, pid, word_size, (void*)vm_addr, buf, size); assert(sizeof(data) >= word_size); @@ -232,7 +232,7 @@ DoWriteMemory(lldb::pid_t pid, if (log) ProcessPOSIXLog::IncNestLevel(); if (log && ProcessPOSIXLog::AtTopNestLevel() && log->GetMask().Test(POSIX_LOG_MEMORY)) - log->Printf ("ProcessMonitor::%s(%d, %d, %p, %p, %d, _)", __FUNCTION__, + log->Printf ("ProcessMonitor::%s(%" PRIu64 ", %d, %p, %p, %zd, _)", __FUNCTION__, pid, word_size, (void*)vm_addr, buf, size); for (bytes_written = 0; bytes_written < size; bytes_written += remainder) @@ -434,7 +434,7 @@ ReadRegOperation::Execute(ProcessMonitor *monitor) m_result = true; } if (log) - log->Printf ("ProcessMonitor::%s() reg %s: 0x%x", __FUNCTION__, + log->Printf ("ProcessMonitor::%s() reg %s: 0x%" PRIx64, __FUNCTION__, POSIXThread::GetRegisterNameFromOffset(m_offset), data); } @@ -1098,7 +1098,7 @@ ProcessMonitor::Launch(LaunchArgs *args) // FIXME: by using pids instead of tids, we can only support one thread. inferior.reset(new POSIXThread(process, pid)); if (log) - log->Printf ("ProcessMonitor::%s() adding pid = %i", __FUNCTION__, pid); + log->Printf ("ProcessMonitor::%s() adding pid = %" PRIu64, __FUNCTION__, pid); process.GetThreadList().AddThread(inferior); // Let our process instance know the thread has stopped. @@ -1183,7 +1183,7 @@ ProcessMonitor::Attach(AttachArgs *args) // Update the process thread list with the attached thread. inferior.reset(new POSIXThread(process, pid)); if (log) - log->Printf ("ProcessMonitor::%s() adding tid = %i", __FUNCTION__, pid); + log->Printf ("ProcessMonitor::%s() adding tid = %" PRIu64, __FUNCTION__, pid); process.GetThreadList().AddThread(inferior); // Let our process instance know the thread has stopped. diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp index f7adc7ae707..8e658a50022 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -166,7 +166,7 @@ CommunicationKDP::SendRequestPacketNoLock (const PacketStreamType &request_packe return true; if (log) - log->Printf ("error: failed to send packet entire packet %llu of %llu bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size); + log->Printf ("error: failed to send packet entire packet %" PRIu64 " of %" PRIu64 " bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size); } return false; } @@ -210,7 +210,7 @@ CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock (DataExtractor &pac size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error); if (log) - log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu", + log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %" PRIu64, __PRETTY_FUNCTION__, timeout_usec, Communication::ConnectionStatusAsCString (status), @@ -876,7 +876,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet) const addr_t region_addr = packet.GetPointer (&offset); const uint32_t region_size = packet.GetU32 (&offset); const uint32_t region_prot = packet.GetU32 (&offset); - s.Printf("\n\tregion[%llu] = { range = [0x%16.16llx - 0x%16.16llx), size = 0x%8.8x, prot = %s }", region_addr, region_addr, region_addr + region_size, region_size, GetPermissionsAsCString (region_prot)); + s.Printf("\n\tregion[%" PRIu64 "] = { range = [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), size = 0x%8.8x, prot = %s }", region_addr, region_addr, region_addr + region_size, region_size, GetPermissionsAsCString (region_prot)); } } break; @@ -997,7 +997,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet) { const uint64_t addr = packet.GetU64 (&offset); const uint32_t size = packet.GetU32 (&offset); - s.Printf(" (addr = 0x%16.16llx, size = %u)", addr, size); + s.Printf(" (addr = 0x%16.16" PRIx64 ", size = %u)", addr, size); m_last_read_memory_addr = addr; } break; @@ -1006,7 +1006,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet) { const uint64_t addr = packet.GetU64 (&offset); const uint32_t size = packet.GetU32 (&offset); - s.Printf(" (addr = 0x%16.16llx, size = %u, bytes = \n", addr, size); + s.Printf(" (addr = 0x%16.16" PRIx64 ", size = %u, bytes = \n", addr, size); if (size > 0) DataExtractor::DumpHexBytes(&s, packet.GetData(&offset, size), size, 32, addr); } @@ -1051,7 +1051,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet) case KDP_BREAKPOINT_REMOVE64: { const uint64_t addr = packet.GetU64 (&offset); - s.Printf(" (addr = 0x%16.16llx)", addr); + s.Printf(" (addr = 0x%16.16" PRIx64 ")", addr); } break; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index 3a7a0798e42..991cf680cad 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -448,7 +448,7 @@ ProcessKDP::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_threa // locker will keep a mutex locked until it goes out of scope LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_THREAD)); if (log && log->GetMask().Test(KDP_LOG_VERBOSE)) - log->Printf ("ProcessKDP::%s (pid = %llu)", __FUNCTION__, GetID()); + log->Printf ("ProcessKDP::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID()); // Even though there is a CPU mask, it doesn't mean to can see each CPU // indivudually, there is really only one. Lets call this thread 1. @@ -744,7 +744,7 @@ ProcessKDP::AsyncThread (void *arg) LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS)); if (log) - log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %llu) thread starting...", arg, pid); + log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread starting...", arg, pid); Listener listener ("ProcessKDP::AsyncThread"); EventSP event_sp; @@ -758,13 +758,13 @@ ProcessKDP::AsyncThread (void *arg) while (!done) { if (log) - log->Printf ("ProcessKDP::AsyncThread (pid = %llu) listener.WaitForEvent (NULL, event_sp)...", + log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...", pid); if (listener.WaitForEvent (NULL, event_sp)) { uint32_t event_type = event_sp->GetType(); if (log) - log->Printf ("ProcessKDP::AsyncThread (pid = %llu) Got an event of type: %d...", + log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") Got an event of type: %d...", pid, event_type); @@ -806,7 +806,7 @@ ProcessKDP::AsyncThread (void *arg) case eBroadcastBitAsyncThreadShouldExit: if (log) - log->Printf ("ProcessKDP::AsyncThread (pid = %llu) got eBroadcastBitAsyncThreadShouldExit...", + log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") got eBroadcastBitAsyncThreadShouldExit...", pid); done = true; is_running = false; @@ -814,7 +814,7 @@ ProcessKDP::AsyncThread (void *arg) default: if (log) - log->Printf ("ProcessKDP::AsyncThread (pid = %llu) got unknown event 0x%8.8x", + log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") got unknown event 0x%8.8x", pid, event_type); done = true; @@ -826,7 +826,7 @@ ProcessKDP::AsyncThread (void *arg) else { if (log) - log->Printf ("ProcessKDP::AsyncThread (pid = %llu) listener.WaitForEvent (NULL, event_sp) => false", + log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp) => false", pid); done = true; } @@ -834,7 +834,7 @@ ProcessKDP::AsyncThread (void *arg) } if (log) - log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %llu) thread exiting...", + log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread exiting...", arg, pid); @@ -965,7 +965,7 @@ public: } else { - result.AppendErrorWithFormat ("invalid command byte 0x%llx, valid values are 1 - 255", command_byte); + result.AppendErrorWithFormat ("invalid command byte 0x%" PRIx64 ", valid values are 1 - 255", command_byte); result.SetStatus (eReturnStatusFailed); } } diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp index 3e42cf50d74..920fccf351c 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp @@ -78,7 +78,7 @@ ThreadKDP::WillResume (StateType resume_state) lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP)); if (log) - log->Printf ("Resuming thread: %4.4llx with state: %s.", GetID(), StateAsCString(resume_state)); + log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state)); return true; } diff --git a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp index 0fbb5f309c4..18e271a42c2 100644 --- a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp +++ b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp @@ -39,7 +39,7 @@ POSIXThread::POSIXThread(Process &process, lldb::tid_t tid) { LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("POSIXThread::%s (tid = %i)", __FUNCTION__, tid); + log->Printf ("POSIXThread::%s (tid = %" PRIi64 ")", __FUNCTION__, tid); } POSIXThread::~POSIXThread() @@ -242,7 +242,7 @@ POSIXThread::BreakNotify(const ProcessMessage &message) assert(GetRegisterContext()); lldb::addr_t pc = GetRegisterContext()->GetPC(); if (log) - log->Printf ("POSIXThread::%s () PC=0x%8.8llx", __FUNCTION__, pc); + log->Printf ("POSIXThread::%s () PC=0x%8.8" PRIx64, __FUNCTION__, pc); lldb::BreakpointSiteSP bp_site(GetProcess()->GetBreakpointSiteList().FindByAddress(pc)); assert(bp_site); lldb::break_id_t bp_id = bp_site->GetID(); diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp index 7666d646a4a..402bc634966 100644 --- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp +++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp @@ -106,7 +106,7 @@ ProcessPOSIX::DoAttachToProcessWithID(lldb::pid_t pid) LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS)); if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("ProcessPOSIX::%s(pid = %i)", __FUNCTION__, GetID()); + log->Printf ("ProcessPOSIX::%s(pid = %" PRIi64 ")", __FUNCTION__, GetID()); m_monitor = new ProcessMonitor(this, pid, error); @@ -380,7 +380,7 @@ ProcessPOSIX::RefreshStateAfterStop() // fixed when this code is fixed to handle multiple threads. lldb::tid_t tid = message.GetTID(); if (log) - log->Printf ("ProcessPOSIX::%s() pid = %i", __FUNCTION__, tid); + log->Printf ("ProcessPOSIX::%s() pid = %" PRIi64, __FUNCTION__, tid); POSIXThread *thread = static_cast<POSIXThread*>( GetThreadList().FindThreadByID(tid, false).get()); @@ -448,7 +448,7 @@ ProcessPOSIX::DoDeallocateMemory(lldb::addr_t addr) InferiorCallMunmap(this, addr, pos->second)) m_addr_to_mmap_size.erase (pos); else - error.SetErrorStringWithFormat("unable to deallocate memory at 0x%llx", addr); + error.SetErrorStringWithFormat("unable to deallocate memory at 0x%" PRIx64, addr); return error; } @@ -503,7 +503,7 @@ ProcessPOSIX::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre { LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD)); if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("ProcessPOSIX::%s() (pid = %i)", __FUNCTION__, GetID()); + log->Printf ("ProcessPOSIX::%s() (pid = %" PRIi64 ")", __FUNCTION__, GetID()); // Update the process thread list with this new thread. // FIXME: We should be using tid, not pid. @@ -514,7 +514,7 @@ ProcessPOSIX::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre } if (log && log->GetMask().Test(POSIX_LOG_VERBOSE)) - log->Printf ("ProcessPOSIX::%s() updated pid = %i", __FUNCTION__, GetID()); + log->Printf ("ProcessPOSIX::%s() updated pid = %" PRIi64, __FUNCTION__, GetID()); new_thread_list.AddThread(thread_sp); return new_thread_list.GetSize(false) > 0; diff --git a/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp b/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp index 9485164c2b6..c0bb9b13fd2 100644 --- a/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp +++ b/lldb/source/Plugins/Process/POSIX/RegisterContext_i386.cpp @@ -620,7 +620,7 @@ RegisterContext_i386::LogGPR(const char *title) for (uint32_t i=0; i<k_num_gpr_registers; i++) { uint32_t reg = gpr_eax + i; - log->Printf("%12s = 0x%8.8x", g_register_infos[reg].name, (&user.regs)[reg]); + log->Printf("%12s = 0x%8.8" PRIx64, g_register_infos[reg].name, ((uint64_t*)&user.regs)[reg]); } } } diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp index 773154b1602..7d97dbd3e41 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp @@ -491,7 +491,7 @@ RegisterContextDarwin_x86_64::LogGPR(Log *log, const char *format, ...) for (uint32_t i=0; i<k_num_gpr_registers; i++) { uint32_t reg = gpr_rax + i; - log->Printf("%12s = 0x%16.16llx", g_register_infos[reg].name, (&gpr.rax)[reg]); + log->Printf("%12s = 0x%16.16" PRIx64, g_register_infos[reg].name, (&gpr.rax)[reg]); } } } diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index e34bf90d6ed..f79daa92efa 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -213,8 +213,8 @@ RegisterContextLLDB::InitializeZerothFrame() m_cfa = cfa_regval + cfa_offset; - UnwindLogMsg ("cfa_regval = 0x%16.16llx (cfa_regval = 0x%16.16llx, cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset); - UnwindLogMsg ("initialized frame current pc is 0x%llx cfa is 0x%llx using %s UnwindPlan", + UnwindLogMsg ("cfa_regval = 0x%16.16" PRIx64 " (cfa_regval = 0x%16.16" PRIx64 ", cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset); + UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64 " using %s UnwindPlan", (uint64_t) m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()), (uint64_t) m_cfa, m_full_unwind_plan_sp->GetSourceName().GetCString()); @@ -254,12 +254,12 @@ RegisterContextLLDB::InitializeNonZerothFrame() if (log) { - UnwindLogMsg ("pc = 0x%16.16llx", pc); + UnwindLogMsg ("pc = 0x%16.16" PRIx64, pc); addr_t reg_val; if (ReadGPRValue (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP, reg_val)) - UnwindLogMsg ("fp = 0x%16.16llx", reg_val); + UnwindLogMsg ("fp = 0x%16.16" PRIx64, reg_val); if (ReadGPRValue (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, reg_val)) - UnwindLogMsg ("sp = 0x%16.16llx", reg_val); + UnwindLogMsg ("sp = 0x%16.16" PRIx64, reg_val); } // A pc of 0x0 means it's the end of the stack crawl @@ -297,7 +297,7 @@ RegisterContextLLDB::InitializeNonZerothFrame() // pc and see if we can get any further. if (GetNextFrame().get() && GetNextFrame()->IsValid() && GetNextFrame()->IsFrameZero()) { - UnwindLogMsg ("had a pc of 0x%llx which is not in executable memory but on frame 1 -- allowing it once.", + UnwindLogMsg ("had a pc of 0x%" PRIx64 " which is not in executable memory but on frame 1 -- allowing it once.", (uint64_t) pc); m_frame_type = eSkipFrame; } @@ -363,7 +363,7 @@ RegisterContextLLDB::InitializeNonZerothFrame() return; } - UnwindLogMsg ("initialized frame cfa is 0x%llx", (uint64_t) m_cfa); + UnwindLogMsg ("initialized frame cfa is 0x%" PRIx64, (uint64_t) m_cfa); return; } m_frame_type = eNotAValidFrame; @@ -506,7 +506,7 @@ RegisterContextLLDB::InitializeNonZerothFrame() m_cfa = cfa_regval + cfa_offset; - UnwindLogMsg ("cfa_regval = 0x%16.16llx (cfa_regval = 0x%16.16llx, cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset); + UnwindLogMsg ("cfa_regval = 0x%16.16" PRIx64 " (cfa_regval = 0x%16.16" PRIx64 ", cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset); // A couple of sanity checks.. if (cfa_regval == LLDB_INVALID_ADDRESS || cfa_regval == 0 || cfa_regval == 1) @@ -544,7 +544,7 @@ RegisterContextLLDB::InitializeNonZerothFrame() } } - UnwindLogMsg ("initialized frame current pc is 0x%llx cfa is 0x%llx", + UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64, (uint64_t) m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()), (uint64_t) m_cfa); } diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp index a15b8a90034..7db57294dcd 100644 --- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp +++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp @@ -215,14 +215,14 @@ StopInfoMachException::GetDescription () if (exc_desc) strm.PutCString(exc_desc); else - strm.Printf("EXC_??? (%llu)", m_value); + strm.Printf("EXC_??? (%" PRIu64 ")", m_value); if (m_exc_data_count >= 1) { if (code_desc) strm.Printf(" (%s=%s", code_label, code_desc); else - strm.Printf(" (%s=%llu", code_label, m_exc_code); + strm.Printf(" (%s=%" PRIu64, code_label, m_exc_code); } if (m_exc_data_count >= 2) @@ -230,7 +230,7 @@ StopInfoMachException::GetDescription () if (subcode_desc) strm.Printf(", %s=%s", subcode_label, subcode_desc); else - strm.Printf(", %s=0x%llx", subcode_label, m_exc_subcode); + strm.Printf(", %s=0x%" PRIx64, subcode_label, m_exc_subcode); } if (m_exc_data_count > 0) diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp index 459a729b8c9..128dbf7b539 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -53,7 +53,7 @@ UnwindLLDB::DoGetFrameCount() { TimeValue now(TimeValue::Now()); uint64_t delta_t = now - time_value; - printf ("%u frames in %llu.%09llu ms (%g frames/sec)\n", + printf ("%u frames in %" PRIu64 ".%09llu ms (%g frames/sec)\n", FRAME_COUNT, delta_t / TimeValue::NanoSecPerSec, delta_t % TimeValue::NanoSecPerSec, diff --git a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp index ffce985c26b..d011314b096 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp @@ -176,7 +176,7 @@ UnwindMacOSXFrameBackchain::GetStackFrameData_i386 (const ExecutionContext &exe_ // printf(" ------------------ ------------------ \n"); // for (i=0; i<m_cursors.size(); ++i) // { -// printf("[%3u] 0x%16.16llx 0x%16.16llx\n", i, m_cursors[i].pc, m_cursors[i].fp); +// printf("[%3u] 0x%16.16" PRIx64 " 0x%16.16" PRIx64 "\n", i, m_cursors[i].pc, m_cursors[i].fp); // } return m_cursors.size(); } diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index d1102b7e6ac..fd9cecaa397 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -92,7 +92,7 @@ GDBRemoteCommunication::History::Dump (lldb_private::Stream &strm) const const Entry &entry = m_packets[idx]; if (entry.type == ePacketTypeInvalid || entry.packet.empty()) break; - strm.Printf ("history[%u] tid=0x%4.4llx <%4u> %s packet: %s\n", + strm.Printf ("history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s\n", entry.packet_idx, entry.tid, entry.bytes_transmitted, @@ -116,7 +116,7 @@ GDBRemoteCommunication::History::Dump (lldb_private::Log *log) const const Entry &entry = m_packets[idx]; if (entry.type == ePacketTypeInvalid || entry.packet.empty()) break; - log->Printf ("history[%u] tid=0x%4.4llx <%4u> %s packet: %s", + log->Printf ("history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s", entry.packet_idx, entry.tid, entry.bytes_transmitted, @@ -298,7 +298,7 @@ GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock (StringExtrac size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error); if (log) - log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu", + log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %" PRIu64, __PRETTY_FUNCTION__, timeout_usec, Communication::ConnectionStatusAsCString (status), diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index e9f1abc85c3..42bf768b17b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1198,7 +1198,7 @@ GDBRemoteCommunicationClient::SendAttach if (pid != LLDB_INVALID_PROCESS_ID) { char packet[64]; - const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%llx", pid); + const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%" PRIx64, pid); assert (packet_len < sizeof(packet)); if (SendPacketAndWaitForResponse (packet, packet_len, response, false)) { @@ -1225,7 +1225,7 @@ GDBRemoteCommunicationClient::AllocateMemory (size_t size, uint32_t permissions) { m_supports_alloc_dealloc_memory = eLazyBoolYes; char packet[64]; - const int packet_len = ::snprintf (packet, sizeof(packet), "_M%llx,%s%s%s", + const int packet_len = ::snprintf (packet, sizeof(packet), "_M%" PRIx64 ",%s%s%s", (uint64_t)size, permissions & lldb::ePermissionsReadable ? "r" : "", permissions & lldb::ePermissionsWritable ? "w" : "", @@ -1252,7 +1252,7 @@ GDBRemoteCommunicationClient::DeallocateMemory (addr_t addr) { m_supports_alloc_dealloc_memory = eLazyBoolYes; char packet[64]; - const int packet_len = ::snprintf(packet, sizeof(packet), "_m%llx", (uint64_t)addr); + const int packet_len = ::snprintf(packet, sizeof(packet), "_m%" PRIx64, (uint64_t)addr); assert (packet_len < sizeof(packet)); StringExtractorGDBRemote response; if (SendPacketAndWaitForResponse (packet, packet_len, response, false)) @@ -1285,7 +1285,7 @@ GDBRemoteCommunicationClient::GetMemoryRegionInfo (lldb::addr_t addr, { m_supports_memory_region_info = eLazyBoolYes; char packet[64]; - const int packet_len = ::snprintf(packet, sizeof(packet), "qMemoryRegionInfo:%llx", (uint64_t)addr); + const int packet_len = ::snprintf(packet, sizeof(packet), "qMemoryRegionInfo:%" PRIx64, (uint64_t)addr); assert (packet_len < sizeof(packet)); StringExtractorGDBRemote response; if (SendPacketAndWaitForResponse (packet, packet_len, response, false)) @@ -1618,7 +1618,7 @@ GDBRemoteCommunicationClient::GetProcessInfo (lldb::pid_t pid, ProcessInstanceIn if (m_supports_qProcessInfoPID) { char packet[32]; - const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%llu", pid); + const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%" PRIu64, pid); assert (packet_len < sizeof(packet)); StringExtractorGDBRemote response; if (SendPacketAndWaitForResponse (packet, packet_len, response, false)) @@ -1688,9 +1688,9 @@ GDBRemoteCommunicationClient::FindProcesses (const ProcessInstanceInfoMatch &mat } if (match_info.GetProcessInfo().ProcessIDIsValid()) - packet.Printf("pid:%llu;",match_info.GetProcessInfo().GetProcessID()); + packet.Printf("pid:%" PRIu64 ";",match_info.GetProcessInfo().GetProcessID()); if (match_info.GetProcessInfo().ParentProcessIDIsValid()) - packet.Printf("parent_pid:%llu;",match_info.GetProcessInfo().GetParentProcessID()); + packet.Printf("parent_pid:%" PRIu64 ";",match_info.GetProcessInfo().GetParentProcessID()); if (match_info.GetProcessInfo().UserIDIsValid()) packet.Printf("uid:%u;",match_info.GetProcessInfo().GetUserID()); if (match_info.GetProcessInfo().GroupIDIsValid()) @@ -1813,7 +1813,7 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets) end_time = TimeValue::Now(); total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970(); packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecPerSec; - printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %llu.%9.9llu sec for %f packets/sec.\n", + printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %" PRIu64 ".%9.9" PRIu64 " sec for %f packets/sec.\n", num_packets, send_size, recv_size, @@ -1837,7 +1837,7 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets) end_time = TimeValue::Now(); total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970(); packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecPerSec; - printf ("%u 'qC' packets packets in 0x%llu%9.9llu sec for %f packets/sec.\n", + printf ("%u 'qC' packets packets in 0x%" PRIu64 "%9.9" PRIu64 " sec for %f packets/sec.\n", num_packets, total_time_nsec / TimeValue::NanoSecPerSec, total_time_nsec % TimeValue::NanoSecPerSec, @@ -1957,7 +1957,7 @@ GDBRemoteCommunicationClient::GetThreadStopInfo (lldb::tid_t tid, StringExtracto if (m_supports_qThreadStopInfo) { char packet[256]; - int packet_len = ::snprintf(packet, sizeof(packet), "qThreadStopInfo%llx", tid); + int packet_len = ::snprintf(packet, sizeof(packet), "qThreadStopInfo%" PRIx64, tid); assert (packet_len < sizeof(packet)); if (SendPacketAndWaitForResponse(packet, packet_len, response, false)) { @@ -1993,7 +1993,7 @@ GDBRemoteCommunicationClient::SendGDBStoppointTypePacket (GDBStoppointType type, char packet[64]; const int packet_len = ::snprintf (packet, sizeof(packet), - "%c%i,%llx,%x", + "%c%i,%" PRIx64 ",%x", insert ? 'Z' : 'z', type, addr, diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index 115d55774c7..e83ea40c91e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -280,7 +280,7 @@ GDBRemoteCommunicationServer::Handle_qHostInfo (StringExtractorGDBRemote &packet static void CreateProcessInfoResponse (const ProcessInstanceInfo &proc_info, StreamString &response) { - response.Printf ("pid:%llu;ppid:%llu;uid:%i;gid:%i;euid:%i;egid:%i;", + response.Printf ("pid:%" PRIu64 ";ppid:%" PRIu64 ";uid:%i;gid:%i;euid:%i;egid:%i;", proc_info.GetProcessID(), proc_info.GetParentProcessID(), proc_info.GetUserID(), @@ -646,7 +646,7 @@ GDBRemoteCommunicationServer::Handle_qC (StringExtractorGDBRemote &packet) { lldb::pid_t pid = m_process_launch_info.GetProcessID(); StreamString response; - response.Printf("QC%llx", pid); + response.Printf("QC%" PRIx64, pid); if (m_is_platform) { // If we launch a process and this GDB server is acting as a platform, @@ -712,7 +712,7 @@ GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote { uint16_t port = (intptr_t)accept_thread_result; char response[256]; - const int response_len = ::snprintf (response, sizeof(response), "pid:%llu;port:%u;", debugserver_pid, port); + const int response_len = ::snprintf (response, sizeof(response), "pid:%" PRIu64 ";port:%u;", debugserver_pid, port); assert (response_len < sizeof(response)); //m_port_to_pid_map[port] = debugserver_launch_info.GetProcessID(); success = SendPacketNoLock (response, response_len) > 0; diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp index a1cac219051..7c4a51e3cc5 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp @@ -155,7 +155,7 @@ GDBRemoteRegisterContext::GetPrimordialRegister(const lldb_private::RegisterInfo int packet_len = 0; const uint32_t reg = reg_info->kinds[eRegisterKindLLDB]; if (gdb_comm.GetThreadSuffixSupported()) - packet_len = ::snprintf (packet, sizeof(packet), "p%x;thread:%4.4llx;", reg, m_thread.GetID()); + packet_len = ::snprintf (packet, sizeof(packet), "p%x;thread:%4.4" PRIx64 ";", reg, m_thread.GetID()); else packet_len = ::snprintf (packet, sizeof(packet), "p%x", reg); assert (packet_len < (sizeof(packet) - 1)); @@ -196,7 +196,7 @@ GDBRemoteRegisterContext::ReadRegisterBytes (const RegisterInfo *reg_info, DataE { // Get all registers in one packet if (thread_suffix_supported) - packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4llx;", m_thread.GetID()); + packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4" PRIx64 ";", m_thread.GetID()); else packet_len = ::snprintf (packet, sizeof(packet), "g"); assert (packet_len < (sizeof(packet) - 1)); @@ -311,7 +311,7 @@ GDBRemoteRegisterContext::SetPrimordialRegister(const lldb_private::RegisterInfo lldb::endian::InlHostByteOrder()); if (gdb_comm.GetThreadSuffixSupported()) - packet.Printf (";thread:%4.4llx;", m_thread.GetID()); + packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetID()); // Invalidate just this register m_reg_valid[reg] = false; @@ -337,7 +337,7 @@ GDBRemoteRegisterContext::SyncThreadState(Process *process) StreamString packet; StringExtractorGDBRemote response; - packet.Printf ("QSyncThreadState:%4.4llx;", m_thread.GetID()); + packet.Printf ("QSyncThreadState:%4.4" PRIx64 ";", m_thread.GetID()); if (gdb_comm.SendPacketAndWaitForResponse(packet.GetString().c_str(), packet.GetString().size(), response, @@ -397,7 +397,7 @@ GDBRemoteRegisterContext::WriteRegisterBytes (const lldb_private::RegisterInfo * lldb::endian::InlHostByteOrder()); if (thread_suffix_supported) - packet.Printf (";thread:%4.4llx;", m_thread.GetID()); + packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetID()); // Invalidate all register values InvalidateIfNeeded (true); @@ -510,7 +510,7 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp) { int packet_len = 0; if (thread_suffix_supported) - packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4llx", m_thread.GetID()); + packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4" PRIx64, m_thread.GetID()); else packet_len = ::snprintf (packet, sizeof(packet), "g"); assert (packet_len < (sizeof(packet) - 1)); @@ -527,7 +527,7 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp) if (thread_suffix_supported) { char thread_id_cstr[64]; - ::snprintf (thread_id_cstr, sizeof(thread_id_cstr), ";thread:%4.4llx;", m_thread.GetID()); + ::snprintf (thread_id_cstr, sizeof(thread_id_cstr), ";thread:%4.4" PRIx64 ";", m_thread.GetID()); response_str.append (thread_id_cstr); } data_sp.reset (new DataBufferHeap (response_str.c_str(), response_str.size())); @@ -650,7 +650,7 @@ GDBRemoteRegisterContext::WriteAllRegisterValues (const lldb::DataBufferSP &data lldb::endian::InlHostByteOrder()); if (thread_suffix_supported) - packet.Printf (";thread:%4.4llx;", m_thread.GetID()); + packet.Printf (";thread:%4.4" PRIx64 ";", m_thread.GetID()); m_reg_valid[reg] = false; if (gdb_comm.SendPacketAndWaitForResponse(packet.GetString().c_str(), diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index e538254739d..94699797107 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -468,10 +468,10 @@ ProcessGDBRemote::DoConnectRemote (Stream *strm, const char *remote_url) SetPrivateState (state); } else - error.SetErrorStringWithFormat ("Process %llu was reported after connecting to '%s', but state was not stopped: %s", pid, remote_url, StateAsCString (state)); + error.SetErrorStringWithFormat ("Process %" PRIu64 " was reported after connecting to '%s', but state was not stopped: %s", pid, remote_url, StateAsCString (state)); } else - error.SetErrorStringWithFormat ("Process %llu was reported after connecting to '%s', but no stop reply packet was received", pid, remote_url); + error.SetErrorStringWithFormat ("Process %" PRIu64 " was reported after connecting to '%s', but no stop reply packet was received", pid, remote_url); } if (error.Success() @@ -960,7 +960,7 @@ ProcessGDBRemote::DoAttachToProcessWithID (lldb::pid_t attach_pid, const Process if (error.Success()) { char packet[64]; - const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%llx", attach_pid); + const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%" PRIx64, attach_pid); SetID (attach_pid); m_async_broadcaster.BroadcastEvent (eBroadcastBitAsyncContinue, new EventDataBytes (packet, packet_len)); } @@ -1092,7 +1092,7 @@ ProcessGDBRemote::DoResume () if (m_gdb_comm.GetVContSupported ('c')) { for (tid_collection::const_iterator t_pos = m_continue_c_tids.begin(), t_end = m_continue_c_tids.end(); t_pos != t_end; ++t_pos) - continue_packet.Printf(";c:%4.4llx", *t_pos); + continue_packet.Printf(";c:%4.4" PRIx64, *t_pos); } else continue_packet_error = true; @@ -1103,7 +1103,7 @@ ProcessGDBRemote::DoResume () if (m_gdb_comm.GetVContSupported ('C')) { for (tid_sig_collection::const_iterator s_pos = m_continue_C_tids.begin(), s_end = m_continue_C_tids.end(); s_pos != s_end; ++s_pos) - continue_packet.Printf(";C%2.2x:%4.4llx", s_pos->second, s_pos->first); + continue_packet.Printf(";C%2.2x:%4.4" PRIx64, s_pos->second, s_pos->first); } else continue_packet_error = true; @@ -1114,7 +1114,7 @@ ProcessGDBRemote::DoResume () if (m_gdb_comm.GetVContSupported ('s')) { for (tid_collection::const_iterator t_pos = m_continue_s_tids.begin(), t_end = m_continue_s_tids.end(); t_pos != t_end; ++t_pos) - continue_packet.Printf(";s:%4.4llx", *t_pos); + continue_packet.Printf(";s:%4.4" PRIx64, *t_pos); } else continue_packet_error = true; @@ -1125,7 +1125,7 @@ ProcessGDBRemote::DoResume () if (m_gdb_comm.GetVContSupported ('S')) { for (tid_sig_collection::const_iterator s_pos = m_continue_S_tids.begin(), s_end = m_continue_S_tids.end(); s_pos != s_end; ++s_pos) - continue_packet.Printf(";S%2.2x:%4.4llx", s_pos->second, s_pos->first); + continue_packet.Printf(";S%2.2x:%4.4" PRIx64, s_pos->second, s_pos->first); } else continue_packet_error = true; @@ -1331,7 +1331,7 @@ ProcessGDBRemote::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new // locker will keep a mutex locked until it goes out of scope LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD)); if (log && log->GetMask().Test(GDBR_LOG_VERBOSE)) - log->Printf ("ProcessGDBRemote::%s (pid = %llu)", __FUNCTION__, GetID()); + log->Printf ("ProcessGDBRemote::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID()); size_t num_thread_ids = m_thread_ids.size(); // The "m_thread_ids" thread ID list should always be updated after each stop @@ -1880,7 +1880,7 @@ ProcessGDBRemote::DoDestroy () || reason == eStopReasonException) { if (log) - log->Printf ("ProcessGDBRemote::DoDestroy() - thread: %lld stopped with reason: %s.", + log->Printf ("ProcessGDBRemote::DoDestroy() - thread: %" PRId64 " stopped with reason: %s.", thread_sp->GetID(), stop_info_sp->GetDescription()); stop_looks_like_crash = true; @@ -1915,7 +1915,7 @@ ProcessGDBRemote::DoDestroy () && reason != eStopReasonException) { if (log) - log->Printf ("ProcessGDBRemote::DoDestroy() - Suspending thread: %lld before running.", + log->Printf ("ProcessGDBRemote::DoDestroy() - Suspending thread: %" PRId64 " before running.", thread_sp->GetID()); thread_sp->SetResumeState(eStateSuspended); } @@ -2026,7 +2026,7 @@ ProcessGDBRemote::DoReadMemory (addr_t addr, void *buf, size_t size, Error &erro } char packet[64]; - const int packet_len = ::snprintf (packet, sizeof(packet), "m%llx,%llx", (uint64_t)addr, (uint64_t)size); + const int packet_len = ::snprintf (packet, sizeof(packet), "m%" PRIx64 ",%" PRIx64, (uint64_t)addr, (uint64_t)size); assert (packet_len + 1 < sizeof(packet)); StringExtractorGDBRemote response; if (m_gdb_comm.SendPacketAndWaitForResponse(packet, packet_len, response, true)) @@ -2062,7 +2062,7 @@ ProcessGDBRemote::DoWriteMemory (addr_t addr, const void *buf, size_t size, Erro } StreamString packet; - packet.Printf("M%llx,%llx:", addr, (uint64_t)size); + packet.Printf("M%" PRIx64 ",%" PRIx64 ":", addr, (uint64_t)size); packet.PutBytesAsRawHex8(buf, size, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder()); StringExtractorGDBRemote response; if (m_gdb_comm.SendPacketAndWaitForResponse(packet.GetData(), packet.GetSize(), response, true)) @@ -2119,7 +2119,7 @@ ProcessGDBRemote::DoAllocateMemory (size_t size, uint32_t permissions, Error &er } if (allocated_addr == LLDB_INVALID_ADDRESS) - error.SetErrorStringWithFormat("unable to allocate %llu bytes of memory with permissions %s", (uint64_t)size, GetPermissionsAsCString (permissions)); + error.SetErrorStringWithFormat("unable to allocate %" PRIu64 " bytes of memory with permissions %s", (uint64_t)size, GetPermissionsAsCString (permissions)); else error.Clear(); return allocated_addr; @@ -2165,7 +2165,7 @@ ProcessGDBRemote::DoDeallocateMemory (lldb::addr_t addr) case eLazyBoolYes: if (!m_gdb_comm.DeallocateMemory (addr)) - error.SetErrorStringWithFormat("unable to deallocate memory at 0x%llx", addr); + error.SetErrorStringWithFormat("unable to deallocate memory at 0x%" PRIx64, addr); break; case eLazyBoolNo: @@ -2176,7 +2176,7 @@ ProcessGDBRemote::DoDeallocateMemory (lldb::addr_t addr) InferiorCallMunmap(this, addr, pos->second)) m_addr_to_mmap_size.erase (pos); else - error.SetErrorStringWithFormat("unable to deallocate memory at 0x%llx", addr); + error.SetErrorStringWithFormat("unable to deallocate memory at 0x%" PRIx64, addr); } break; } @@ -2209,12 +2209,12 @@ ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site) user_id_t site_id = bp_site->GetID(); const addr_t addr = bp_site->GetLoadAddress(); if (log) - log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %llu) address = 0x%llx", site_id, (uint64_t)addr); + log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %" PRIu64 ") address = 0x%" PRIx64, site_id, (uint64_t)addr); if (bp_site->IsEnabled()) { if (log) - log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %llu) address = 0x%llx -- SUCCESS (already enabled)", site_id, (uint64_t)addr); + log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %" PRIu64 ") address = 0x%" PRIx64 " -- SUCCESS (already enabled)", site_id, (uint64_t)addr); return error; } else @@ -2252,7 +2252,7 @@ ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site) if (log) { const char *err_string = error.AsCString(); - log->Printf ("ProcessGDBRemote::EnableBreakpoint() error for breakpoint at 0x%8.8llx: %s", + log->Printf ("ProcessGDBRemote::EnableBreakpoint() error for breakpoint at 0x%8.8" PRIx64 ": %s", bp_site->GetLoadAddress(), err_string ? err_string : "NULL"); } @@ -2271,7 +2271,7 @@ ProcessGDBRemote::DisableBreakpoint (BreakpointSite *bp_site) user_id_t site_id = bp_site->GetID(); LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS)); if (log) - log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %llu) addr = 0x%8.8llx", site_id, (uint64_t)addr); + log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64, site_id, (uint64_t)addr); if (bp_site->IsEnabled()) { @@ -2300,7 +2300,7 @@ ProcessGDBRemote::DisableBreakpoint (BreakpointSite *bp_site) else { if (log) - log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %llu) addr = 0x%8.8llx -- SUCCESS (already disabled)", site_id, (uint64_t)addr); + log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)", site_id, (uint64_t)addr); return error; } @@ -2337,11 +2337,11 @@ ProcessGDBRemote::EnableWatchpoint (Watchpoint *wp) addr_t addr = wp->GetLoadAddress(); LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS)); if (log) - log->Printf ("ProcessGDBRemote::EnableWatchpoint(watchID = %llu)", watchID); + log->Printf ("ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64 ")", watchID); if (wp->IsEnabled()) { if (log) - log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %llu) addr = 0x%8.8llx: watchpoint already enabled.", watchID, (uint64_t)addr); + log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64 ") addr = 0x%8.8" PRIx64 ": watchpoint already enabled.", watchID, (uint64_t)addr); return error; } @@ -2381,12 +2381,12 @@ ProcessGDBRemote::DisableWatchpoint (Watchpoint *wp) addr_t addr = wp->GetLoadAddress(); if (log) - log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %llu) addr = 0x%8.8llx", watchID, (uint64_t)addr); + log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64 ") addr = 0x%8.8" PRIx64, watchID, (uint64_t)addr); if (!wp->IsEnabled()) { if (log) - log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %llu) addr = 0x%8.8llx -- SUCCESS (already disabled)", watchID, (uint64_t)addr); + log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64 ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)", watchID, (uint64_t)addr); // See also 'class WatchpointSentry' within StopInfo.cpp. // This disabling attempt might come from the user-supplied actions, we'll route it in order for // the watchpoint object to intelligently process this action. @@ -2580,7 +2580,7 @@ ProcessGDBRemote::StartDebugserverProcess (const char *debugserver_url, const Pr m_debugserver_pid = LLDB_INVALID_PROCESS_ID; if (error.Fail() || log) - error.PutToLog(log.get(), "Host::LaunchProcess (launch_info) => pid=%llu, path='%s'", m_debugserver_pid, debugserver_path); + error.PutToLog(log.get(), "Host::LaunchProcess (launch_info) => pid=%" PRIu64 ", path='%s'", m_debugserver_pid, debugserver_path); } else { @@ -2625,7 +2625,7 @@ ProcessGDBRemote::MonitorDebugserverProcess TargetSP target_sp (Debugger::FindTargetWithProcess(process)); if (log) - log->Printf ("ProcessGDBRemote::MonitorDebugserverProcess (baton=%p, pid=%llu, signo=%i (0x%x), exit_status=%i)", callback_baton, debugserver_pid, signo, signo, exit_status); + log->Printf ("ProcessGDBRemote::MonitorDebugserverProcess (baton=%p, pid=%" PRIu64 ", signo=%i (0x%x), exit_status=%i)", callback_baton, debugserver_pid, signo, signo, exit_status); if (target_sp) { @@ -2786,7 +2786,7 @@ ProcessGDBRemote::AsyncThread (void *arg) LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS)); if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) thread starting...", __FUNCTION__, arg, process->GetID()); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread starting...", __FUNCTION__, arg, process->GetID()); Listener listener ("ProcessGDBRemote::AsyncThread"); EventSP event_sp; @@ -2801,14 +2801,14 @@ ProcessGDBRemote::AsyncThread (void *arg) while (!done) { if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID()); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID()); if (listener.WaitForEvent (NULL, event_sp)) { const uint32_t event_type = event_sp->GetType(); if (event_sp->BroadcasterIs (&process->m_async_broadcaster)) { if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type); switch (event_type) { @@ -2821,7 +2821,7 @@ ProcessGDBRemote::AsyncThread (void *arg) const char *continue_cstr = (const char *)continue_packet->GetBytes (); const size_t continue_cstr_len = continue_packet->GetByteSize (); if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got eBroadcastBitAsyncContinue: %s", __FUNCTION__, arg, process->GetID(), continue_cstr); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") got eBroadcastBitAsyncContinue: %s", __FUNCTION__, arg, process->GetID(), continue_cstr); if (::strstr (continue_cstr, "vAttach") == NULL) process->SetPrivateState(eStateRunning); @@ -2865,13 +2865,13 @@ ProcessGDBRemote::AsyncThread (void *arg) case eBroadcastBitAsyncThreadShouldExit: if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID()); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID()); done = true; break; default: if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type); done = true; break; } @@ -2888,14 +2888,14 @@ ProcessGDBRemote::AsyncThread (void *arg) else { if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID()); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID()); done = true; } } } if (log) - log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) thread exiting...", __FUNCTION__, arg, process->GetID()); + log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64 ") thread exiting...", __FUNCTION__, arg, process->GetID()); process->m_async_thread = LLDB_INVALID_HOST_THREAD; return NULL; diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index 36fa418cf2b..001cc60aea1 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -97,7 +97,7 @@ ThreadGDBRemote::WillResume (StateType resume_state) int signo = GetResumeSignal(); lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (GDBR_LOG_THREAD)); if (log) - log->Printf ("Resuming thread: %4.4llx with state: %s.", GetID(), StateAsCString(resume_state)); + log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state)); ProcessSP process_sp (GetProcess()); if (process_sp) diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp index 5b346144ea5..4827dd8c1eb 100644 --- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp +++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp @@ -163,7 +163,7 @@ ProcessMachCore::GetDynamicLoaderAddress (lldb::addr_t addr) } // TODO: swap header if needed... - //printf("0x%16.16llx: magic = 0x%8.8x, file_type= %u\n", vaddr, header.magic, header.filetype); + //printf("0x%16.16" PRIx64 ": magic = 0x%8.8x, file_type= %u\n", vaddr, header.magic, header.filetype); if (header.magic == llvm::MachO::HeaderMagic32 || header.magic == llvm::MachO::HeaderMagic64) { @@ -175,14 +175,14 @@ ProcessMachCore::GetDynamicLoaderAddress (lldb::addr_t addr) switch (header.filetype) { case llvm::MachO::HeaderFileTypeDynamicLinkEditor: - //printf("0x%16.16llx: file_type = MH_DYLINKER\n", vaddr); + //printf("0x%16.16" PRIx64 ": file_type = MH_DYLINKER\n", vaddr); // Address of dyld "struct mach_header" in the core file m_dyld_plugin_name = DynamicLoaderMacOSXDYLD::GetPluginNameStatic(); m_dyld_addr = addr; return true; case llvm::MachO::HeaderFileTypeExecutable: - //printf("0x%16.16llx: file_type = MH_EXECUTE\n", vaddr); + //printf("0x%16.16" PRIx64 ": file_type = MH_EXECUTE\n", vaddr); // Check MH_EXECUTABLE file types to see if the dynamic link object flag // is NOT set. If it isn't, then we have a mach_kernel. if ((header.flags & llvm::MachO::HeaderFlagBitIsDynamicLinkObject) == 0) @@ -256,7 +256,7 @@ ProcessMachCore::DoLoadCore () ranges_are_sorted = false; vm_addr = section->GetFileAddress(); VMRangeToFileOffset::Entry *last_entry = m_core_aranges.Back(); -// printf ("LC_SEGMENT[%u] arange=[0x%16.16llx - 0x%16.16llx), frange=[0x%8.8x - 0x%8.8x)\n", +// printf ("LC_SEGMENT[%u] arange=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), frange=[0x%8.8x - 0x%8.8x)\n", // i, // range_entry.GetRangeBase(), // range_entry.GetRangeEnd(), @@ -413,7 +413,7 @@ ProcessMachCore::DoReadMemory (addr_t addr, void *buf, size_t size, Error &error } else { - error.SetErrorStringWithFormat ("core file does not contain 0x%llx", addr); + error.SetErrorStringWithFormat ("core file does not contain 0x%" PRIx64, addr); } } return 0; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp index 57ef6ba4eb4..81dc58cc312 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp @@ -243,7 +243,7 @@ DWARFDebugArangeSet::Dump(Stream *s) const DescriptorConstIter pos; DescriptorConstIter end = m_arange_descriptors.end(); for (pos = m_arange_descriptors.begin(); pos != end; ++pos) - s->Printf("[0x%*.*llx - 0x%*.*llx)\n", + s->Printf("[0x%*.*" PRIx64 " - 0x%*.*" PRIx64 ")\n", hex_width, hex_width, pos->address, hex_width, hex_width, pos->end_address()); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp index ec212fdc137..94519a472f1 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp @@ -118,7 +118,7 @@ DWARFDebugAranges::Dump (Log *log) const { const RangeToDIE::Entry *entry = m_aranges.GetEntryAtIndex(i); if (entry) - log->Printf ("0x%8.8x: [0x%llx - 0x%llx)", + log->Printf ("0x%8.8x: [0x%" PRIx64 " - 0x%" PRIx64 ")", entry->data, entry->GetRangeBase(), entry->GetRangeEnd()); @@ -143,7 +143,7 @@ DWARFDebugAranges::Sort (bool minimize) if (log) { orig_arange_size = m_aranges.GetSize(); - log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %llu entries", minimize, (uint64_t)orig_arange_size); + log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %" PRIu64 " entries", minimize, (uint64_t)orig_arange_size); } m_aranges.Sort(); @@ -155,7 +155,7 @@ DWARFDebugAranges::Sort (bool minimize) { const size_t new_arange_size = m_aranges.GetSize(); const size_t delta = orig_arange_size - new_arange_size; - log->Printf ("DWARFDebugAranges::Sort() %llu entries after minimizing (%llu entries combined for %llu bytes saved)", + log->Printf ("DWARFDebugAranges::Sort() %" PRIu64 " entries after minimizing (%" PRIu64 " entries combined for %" PRIu64 " bytes saved)", (uint64_t)new_arange_size, (uint64_t)delta, (uint64_t)delta * sizeof(Range)); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index 529ba9b2c04..71c6c71e475 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -1077,7 +1077,7 @@ DWARFDebugInfoEntry::DumpAttribute { case DW_AT_stmt_list: if ( verbose ) s.PutCString(" ( "); - s.Printf( "0x%8.8llx", form_value.Unsigned()); + s.Printf( "0x%8.8" PRIx64, form_value.Unsigned()); if ( verbose ) s.PutCString(" )"); break; @@ -1761,7 +1761,7 @@ DWARFDebugInfoEntry::BuildFunctionAddressRangeTable hi_pc = GetAttributeValueAsUnsigned(dwarf2Data, cu, DW_AT_high_pc, DW_INVALID_ADDRESS); if (hi_pc != DW_INVALID_ADDRESS) { - // printf("BuildAddressRangeTable() 0x%8.8x: [0x%16.16llx - 0x%16.16llx)\n", m_offset, lo_pc, hi_pc); // DEBUG ONLY + // printf("BuildAddressRangeTable() 0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", m_offset, lo_pc, hi_pc); // DEBUG ONLY debug_aranges->AppendRange (GetOffset(), lo_pc, hi_pc); } } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index d21753c9e78..77fd4eed5d9 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -100,7 +100,7 @@ DumpStateToFile (dw_offset_t offset, const DWARFDebugLine::State& state, void* u } else { - log->Printf( "0x%16.16llx %6u %6u %6u%s\n", state.address, state.line, state.column, state.file, state.end_sequence ? " END" : ""); + log->Printf( "0x%16.16" PRIx64 " %6u %6u %6u%s\n", state.address, state.line, state.column, state.file, state.end_sequence ? " END" : ""); } } @@ -236,7 +236,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d case DW_LNE_set_address : { row.address = debug_line_data.GetMaxU64(&offset, arg_size); - log->Printf( "0x%8.8x: DW_LNE_set_address (0x%llx)", op_offset, row.address); + log->Printf( "0x%8.8x: DW_LNE_set_address (0x%" PRIx64 ")", op_offset, row.address); } break; @@ -314,7 +314,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d { uint8_t adjust_opcode = 255 - prologue.opcode_base; dw_addr_t addr_offset = (adjust_opcode / prologue.line_range) * prologue.min_inst_length; - log->Printf( "0x%8.8x: DW_LNS_const_add_pc (0x%8.8llx)", op_offset, addr_offset); + log->Printf( "0x%8.8x: DW_LNS_const_add_pc (0x%8.8" PRIx64 ")", op_offset, addr_offset); row.address += addr_offset; } break; @@ -362,7 +362,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d uint8_t adjust_opcode = opcode - prologue.opcode_base; dw_addr_t addr_offset = (adjust_opcode / prologue.line_range) * prologue.min_inst_length; int32_t line_offset = prologue.line_base + (adjust_opcode % prologue.line_range); - log->Printf("0x%8.8x: address += 0x%llx, line += %i\n", op_offset, (uint64_t)addr_offset, line_offset); + log->Printf("0x%8.8x: address += 0x%" PRIx64 ", line += %i\n", op_offset, (uint64_t)addr_offset, line_offset); row.address += addr_offset; row.line += line_offset; row.Dump (log); @@ -1122,7 +1122,7 @@ DWARFDebugLine::Row::Reset(bool default_is_stmt) void DWARFDebugLine::Row::Dump(Log *log) const { - log->Printf( "0x%16.16llx %6u %6u %6u %3u %s%s%s%s%s", + log->Printf( "0x%16.16" PRIx64 " %6u %6u %6u %3u %s%s%s%s%s", address, line, column, diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp index 7dfbc64a7ae..4df4d2478c8 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp @@ -32,11 +32,11 @@ bool DWARFDebugPubnames::Extract(const DataExtractor& data) { Timer scoped_timer (__PRETTY_FUNCTION__, - "DWARFDebugPubnames::Extract (byte_size = %llu)", + "DWARFDebugPubnames::Extract (byte_size = %" PRIu64 ")", (uint64_t)data.GetByteSize()); LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES)); if (log) - log->Printf("DWARFDebugPubnames::Extract (byte_size = %llu)", (uint64_t)data.GetByteSize()); + log->Printf("DWARFDebugPubnames::Extract (byte_size = %" PRIu64 ")", (uint64_t)data.GetByteSize()); if (data.ValidOffset(0)) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index 6ccd5601aab..3288404b236 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -295,7 +295,7 @@ DWARFFormValue::Dump(Stream &s, const DataExtractor* debug_str_data, const DWARF switch (m_form) { case DW_FORM_exprloc: - case DW_FORM_block: s.Printf("<0x%llx> ", uvalue); break; + case DW_FORM_block: s.Printf("<0x%" PRIx64 "> ", uvalue); break; case DW_FORM_block1: s.Printf("<0x%2.2x> ", (uint8_t)uvalue); break; case DW_FORM_block2: s.Printf("<0x%4.4x> ", (uint16_t)uvalue); break; case DW_FORM_block4: s.Printf("<0x%8.8x> ", (uint32_t)uvalue); break; @@ -343,8 +343,8 @@ DWARFFormValue::Dump(Stream &s, const DataExtractor* debug_str_data, const DWARF case DW_FORM_ref1: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%2.2x", (uint8_t)uvalue); break; case DW_FORM_ref2: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%4.4x", (uint16_t)uvalue); break; case DW_FORM_ref4: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%4.4x", (uint32_t)uvalue); break; - case DW_FORM_ref8: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%8.8llx", uvalue); break; - case DW_FORM_ref_udata: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%llx", uvalue); break; + case DW_FORM_ref8: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%8.8" PRIx64, uvalue); break; + case DW_FORM_ref_udata: cu_relative_offset = true; if (verbose) s.Printf("cu + 0x%" PRIx64, uvalue); break; // All DW_FORM_indirect attributes should be resolved prior to calling this function case DW_FORM_indirect: s.PutCString("DW_FORM_indirect"); break; @@ -359,7 +359,7 @@ DWARFFormValue::Dump(Stream &s, const DataExtractor* debug_str_data, const DWARF if (verbose) s.PutCString(" => "); - s.Printf("{0x%8.8llx}", (uvalue + (cu ? cu->GetOffset() : 0))); + s.Printf("{0x%8.8" PRIx64 "}", (uvalue + (cu ? cu->GetOffset() : 0))); } } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp index bb72efd41ad..81492a992f2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFLocationDescription.cpp @@ -71,7 +71,7 @@ print_dwarf_exp_op (Stream &s, { uint = data.GetULEB128(offset_ptr); sint = data.GetSLEB128(offset_ptr); - s.Printf("%llu %lli", uint, sint); + s.Printf("%" PRIu64 " %" PRIi64, uint, sint); return 0; } if (opcode_class != DRC_ONEOPERAND) @@ -156,16 +156,16 @@ print_dwarf_exp_op (Stream &s, switch (size) { - case -1: sint = (int8_t) data.GetU8(offset_ptr); s.Printf("%+lli", sint); break; - case -2: sint = (int16_t) data.GetU16(offset_ptr); s.Printf("%+lli", sint); break; - case -4: sint = (int32_t) data.GetU32(offset_ptr); s.Printf("%+lli", sint); break; - case -8: sint = (int64_t) data.GetU64(offset_ptr); s.Printf("%+lli", sint); break; - case -128: sint = data.GetSLEB128(offset_ptr); s.Printf("%+lli", sint); break; - case 1: uint = data.GetU8(offset_ptr); s.Printf("0x%2.2llx", uint); break; - case 2: uint = data.GetU16(offset_ptr); s.Printf("0x%4.4llx", uint); break; - case 4: uint = data.GetU32(offset_ptr); s.Printf("0x%8.8llx", uint); break; - case 8: uint = data.GetU64(offset_ptr); s.Printf("0x%16.16llx", uint); break; - case 128: uint = data.GetULEB128(offset_ptr); s.Printf("0x%llx", uint); break; + case -1: sint = (int8_t) data.GetU8(offset_ptr); s.Printf("%+" PRIi64, sint); break; + case -2: sint = (int16_t) data.GetU16(offset_ptr); s.Printf("%+" PRIi64, sint); break; + case -4: sint = (int32_t) data.GetU32(offset_ptr); s.Printf("%+" PRIi64, sint); break; + case -8: sint = (int64_t) data.GetU64(offset_ptr); s.Printf("%+" PRIi64, sint); break; + case -128: sint = data.GetSLEB128(offset_ptr); s.Printf("%+" PRIi64, sint); break; + case 1: uint = data.GetU8(offset_ptr); s.Printf("0x%2.2" PRIx64, uint); break; + case 2: uint = data.GetU16(offset_ptr); s.Printf("0x%4.4" PRIx64, uint); break; + case 4: uint = data.GetU32(offset_ptr); s.Printf("0x%8.8" PRIx64, uint); break; + case 8: uint = data.GetU64(offset_ptr); s.Printf("0x%16.16" PRIx64, uint); break; + case 128: uint = data.GetULEB128(offset_ptr); s.Printf("0x%" PRIx64, uint); break; } return 0; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index e70a225e448..ca7d24a568d 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -126,14 +126,14 @@ public: { StreamString log_strm; const size_t n = m_dies.size(); - log_strm.Printf("DIEStack[%llu]:\n", (uint64_t)n); + log_strm.Printf("DIEStack[%" PRIu64 "]:\n", (uint64_t)n); for (size_t i=0; i<n; i++) { DWARFCompileUnit *cu = m_dies[i].cu; const DWARFDebugInfoEntry *die = m_dies[i].die; std::string qualified_name; die->GetQualifiedName(dwarf, cu, qualified_name); - log_strm.Printf ("[%llu] 0x%8.8x: %s name='%s'\n", + log_strm.Printf ("[%" PRIu64 "] 0x%8.8x: %s name='%s'\n", (uint64_t)i, die->GetOffset(), DW_TAG_value_to_name(die->Tag()), @@ -1856,12 +1856,12 @@ SymbolFileDWARF::ParseChildMembers else { if (name) - GetObjectFile()->GetModule()->ReportError ("0x%8.8llx: DW_TAG_member '%s' refers to type 0x%8.8llx which was unable to be parsed", + GetObjectFile()->GetModule()->ReportError ("0x%8.8" PRIx64 ": DW_TAG_member '%s' refers to type 0x%8.8" PRIx64 " which was unable to be parsed", MakeUserID(die->GetOffset()), name, encoding_uid); else - GetObjectFile()->GetModule()->ReportError ("0x%8.8llx: DW_TAG_member refers to type 0x%8.8llx which was unable to be parsed", + GetObjectFile()->GetModule()->ReportError ("0x%8.8" PRIx64 ": DW_TAG_member refers to type 0x%8.8" PRIx64 " which was unable to be parsed", MakeUserID(die->GetOffset()), encoding_uid); } @@ -2192,7 +2192,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type if (log) { GetObjectFile()->GetModule()->LogMessageVerboseBacktrace (log.get(), - "0x%8.8llx: %s '%s' resolving forward declaration...", + "0x%8.8" PRIx64 ": %s '%s' resolving forward declaration...", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type->GetName().AsCString()); @@ -2389,7 +2389,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type if (log) { GetObjectFile()->GetModule()->LogMessage (log.get(), - "SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) caching layout info for record_decl = %p, bit_size = %llu, alignment = %llu, field_offsets[%u], base_offsets[%u], vbase_offsets[%u])", + "SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (clang_type = %p) caching layout info for record_decl = %p, bit_size = %" PRIu64 ", alignment = %" PRIu64 ", field_offsets[%u], base_offsets[%u], vbase_offsets[%u])", clang_type, record_decl, layout_info.bit_size, @@ -2525,7 +2525,7 @@ uint32_t SymbolFileDWARF::ResolveSymbolContext (const Address& so_addr, uint32_t resolve_scope, SymbolContext& sc) { Timer scoped_timer(__PRETTY_FUNCTION__, - "SymbolFileDWARF::ResolveSymbolContext (so_addr = { section = %p, offset = 0x%llx }, resolve_scope = 0x%8.8x)", + "SymbolFileDWARF::ResolveSymbolContext (so_addr = { section = %p, offset = 0x%" PRIx64 " }, resolve_scope = 0x%8.8x)", so_addr.GetSection().get(), so_addr.GetOffset(), resolve_scope); @@ -4339,7 +4339,7 @@ SymbolFileDWARF::ResolveNamespaceDIE (DWARFCompileUnit *dwarf_cu, const DWARFDeb if (namespace_name) { GetObjectFile()->GetModule()->LogMessage (log.get(), - "ASTContext => %p: 0x%8.8llx: DW_TAG_namespace with DW_AT_name(\"%s\") => clang::NamespaceDecl *%p (original = %p)", + "ASTContext => %p: 0x%8.8" PRIx64 ": DW_TAG_namespace with DW_AT_name(\"%s\") => clang::NamespaceDecl *%p (original = %p)", GetClangASTContext().getASTContext(), MakeUserID(die->GetOffset()), namespace_name, @@ -4349,7 +4349,7 @@ SymbolFileDWARF::ResolveNamespaceDIE (DWARFCompileUnit *dwarf_cu, const DWARFDeb else { GetObjectFile()->GetModule()->LogMessage (log.get(), - "ASTContext => %p: 0x%8.8llx: DW_TAG_namespace (anonymous) => clang::NamespaceDecl *%p (original = %p)", + "ASTContext => %p: 0x%8.8" PRIx64 ": DW_TAG_namespace (anonymous) => clang::NamespaceDecl *%p (original = %p)", GetClangASTContext().getASTContext(), MakeUserID(die->GetOffset()), namespace_decl, @@ -4623,7 +4623,7 @@ SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE (const DWARFDebugInfoEntry Type *resolved_type = ResolveType (type_cu, type_die, false); if (resolved_type && resolved_type != DIE_IS_BEING_PARSED) { - DEBUG_PRINTF ("resolved 0x%8.8llx (cu 0x%8.8llx) from %s to 0x%8.8llx (cu 0x%8.8llx)\n", + DEBUG_PRINTF ("resolved 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ") from %s to 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ")\n", MakeUserID(die->GetOffset()), MakeUserID(dwarf_cu->GetOffset()), m_obj_file->GetFileSpec().GetFilename().AsCString(), @@ -4884,7 +4884,7 @@ SymbolFileDWARF::FindDefinitionTypeForDIE (DWARFCompileUnit* cu, Type *resolved_type = ResolveType (type_cu, type_die, false); if (resolved_type && resolved_type != DIE_IS_BEING_PARSED) { - DEBUG_PRINTF ("resolved 0x%8.8llx (cu 0x%8.8llx) from %s to 0x%8.8llx (cu 0x%8.8llx)\n", + DEBUG_PRINTF ("resolved 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ") from %s to 0x%8.8" PRIx64 " (cu 0x%8.8" PRIx64 ")\n", MakeUserID(die->GetOffset()), MakeUserID(dwarf_cu->GetOffset()), m_obj_file->GetFileSpec().GetFilename().AsCString(), @@ -5210,7 +5210,7 @@ SymbolFileDWARF::CopyUniqueClassMethodTypes (Type *class_type, if (src_child_type) { if (log) - log->Printf ("uniquing type %p (uid=0x%llx) from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset()); + log->Printf ("uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset()); m_die_to_type[dst_die] = src_child_type; } else @@ -5253,7 +5253,7 @@ SymbolFileDWARF::CopyUniqueClassMethodTypes (Type *class_type, if (src_child_type) { if (log) - log->Printf ("uniquing type %p (uid=0x%llx) from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset()); + log->Printf ("uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x", src_child_type, src_child_type->GetID(), src_die->GetOffset(), dst_die->GetOffset()); m_die_to_type[dst_die] = src_child_type; } else @@ -5413,7 +5413,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } } - DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\") type => 0x%8.8x\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr, encoding_uid); + DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\") type => 0x%8.8x\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr, encoding_uid); switch (tag) { @@ -5626,7 +5626,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } } - DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); + DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); int tag_decl_kind = -1; AccessType default_accessibility = eAccessNone; @@ -5689,7 +5689,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, if (log) { GetObjectFile()->GetModule()->LogMessage (log.get(), - "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is an incomplete objc type, complete type is 0x%8.8llx", + "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is an incomplete objc type, complete type is 0x%8.8" PRIx64, this, die->GetOffset(), DW_TAG_value_to_name(tag), @@ -5743,7 +5743,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, if (log) { GetObjectFile()->GetModule()->LogMessage (log.get(), - "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a forward declaration, complete type is 0x%8.8llx", + "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a forward declaration, complete type is 0x%8.8" PRIx64, this, die->GetOffset(), DW_TAG_value_to_name(tag), @@ -5950,7 +5950,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } } - DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); + DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); clang_type_t enumerator_clang_type = NULL; clang_type = m_forward_decl_die_to_clang_type.lookup (die); @@ -6109,7 +6109,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } } - DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); + DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); clang_type_t return_clang_type = NULL; Type *func_type = NULL; @@ -6260,7 +6260,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } else { - GetObjectFile()->GetModule()->ReportWarning ("0x%8.8llx: DW_AT_specification(0x%8.8x) has no decl\n", + GetObjectFile()->GetModule()->ReportWarning ("0x%8.8" PRIx64 ": DW_AT_specification(0x%8.8x) has no decl\n", MakeUserID(die->GetOffset()), specification_die_offset); } @@ -6283,7 +6283,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } else { - GetObjectFile()->GetModule()->ReportWarning ("0x%8.8llx: DW_AT_abstract_origin(0x%8.8x) has no decl\n", + GetObjectFile()->GetModule()->ReportWarning ("0x%8.8" PRIx64 ": DW_AT_abstract_origin(0x%8.8x) has no decl\n", MakeUserID(die->GetOffset()), abstract_origin_die_offset); } @@ -6312,7 +6312,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, { clang::CXXMethodDecl *cxx_method_decl; // REMOVE THE CRASH DESCRIPTION BELOW - Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8llx from %s/%s", + Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8" PRIx64 " from %s/%s", type_name_cstr, class_type->GetName().GetCString(), MakeUserID(die->GetOffset()), @@ -6498,7 +6498,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, } } - DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); + DEBUG_PRINTF ("0x%8.8" PRIx64 ": %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr); Type *element_type = ResolveTypeUID(type_die_offset); @@ -7216,7 +7216,7 @@ SymbolFileDWARF::ParseVariables } else { - GetObjectFile()->GetModule()->ReportError ("parent 0x%8.8llx %s with no valid compile unit in symbol context for 0x%8.8llx %s.\n", + GetObjectFile()->GetModule()->ReportError ("parent 0x%8.8" PRIx64 " %s with no valid compile unit in symbol context for 0x%8.8" PRIx64 " %s.\n", MakeUserID(sc_parent_die->GetOffset()), DW_TAG_value_to_name (parent_tag), MakeUserID(orig_die->GetOffset()), @@ -7260,7 +7260,7 @@ SymbolFileDWARF::ParseVariables break; default: - GetObjectFile()->GetModule()->ReportError ("didn't find appropriate parent DIE for variable list for 0x%8.8llx %s.\n", + GetObjectFile()->GetModule()->ReportError ("didn't find appropriate parent DIE for variable list for 0x%8.8" PRIx64 " %s.\n", MakeUserID(orig_die->GetOffset()), DW_TAG_value_to_name (orig_die->Tag())); break; @@ -7490,7 +7490,7 @@ SymbolFileDWARF::LayoutRecordType (const clang::RecordDecl *record_decl, if (log) GetObjectFile()->GetModule()->LogMessage (log.get(), - "SymbolFileDWARF::LayoutRecordType (record_decl = %p, bit_size = %llu, alignment = %llu, field_offsets[%u],base_offsets[%u], vbase_offsets[%u]) success = %i", + "SymbolFileDWARF::LayoutRecordType (record_decl = %p, bit_size = %" PRIu64 ", alignment = %" PRIu64 ", field_offsets[%u],base_offsets[%u], vbase_offsets[%u]) success = %i", record_decl, bit_size, alignment, diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp index 84cd77ae1fa..ccbde2be07b 100644 --- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp +++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp @@ -271,7 +271,7 @@ UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly (AddressRange& { StreamString strm; lldb::addr_t base_addr = range.GetBaseAddress().GetLoadAddress(thread.CalculateTarget().get()); - strm.Printf ("Resulting unwind rows for [0x%llx - 0x%llx):", base_addr, base_addr + range.GetByteSize()); + strm.Printf ("Resulting unwind rows for [0x%" PRIx64 " - 0x%" PRIx64 "):", base_addr, base_addr + range.GetByteSize()); unwind_plan.Dump(strm, &thread, base_addr); log->PutCString (strm.GetData()); } @@ -403,7 +403,7 @@ UnwindAssemblyInstEmulation::ReadMemory (EmulateInstruction *instruction, if (log && log->GetVerbose ()) { StreamString strm; - strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory (addr = 0x%16.16llx, dst = %p, dst_len = %llu, context = ", + strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory (addr = 0x%16.16" PRIx64 ", dst = %p, dst_len = %" PRIu64 ", context = ", addr, dst, (uint64_t)dst_len); |