diff options
author | Jason Molenda <jmolenda@apple.com> | 2011-09-20 21:44:10 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2011-09-20 21:44:10 +0000 |
commit | fd54b368ea4d1bd481ac4d203362c2a5556418d0 (patch) | |
tree | 3adaaf91c485565d39e32762804b69439977c8fd /lldb/source | |
parent | 33e91a6cf7a66b83b29e842268bf9b0a1ef14711 (diff) | |
download | bcm5719-llvm-fd54b368ea4d1bd481ac4d203362c2a5556418d0.tar.gz bcm5719-llvm-fd54b368ea4d1bd481ac4d203362c2a5556418d0.zip |
Update declarations for all functions/methods that accept printf-style
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses. Fix all incorrect uses. Most of these are innocuous,
a few were resulting in crashes.
llvm-svn: 140185
Diffstat (limited to 'lldb/source')
59 files changed, 152 insertions, 160 deletions
diff --git a/lldb/source/API/SBData.cpp b/lldb/source/API/SBData.cpp index cee63164859..58593416789 100644 --- a/lldb/source/API/SBData.cpp +++ b/lldb/source/API/SBData.cpp @@ -108,7 +108,7 @@ SBData::GetByteSize () value = m_opaque_sp->GetByteSize(); if (log) log->Printf ("SBData::GetByteSize () => " - "(%i)", value); + "(%lu)", value); return value; } @@ -187,7 +187,7 @@ SBData::GetLongDouble (lldb::SBError& error, uint32_t offset) } if (log) log->Printf ("SBData::GetLongDouble (error=%p,offset=%d) => " - "(%lf)", error.get(), offset, value); + "(%Lf)", error.get(), offset, value); return value; } @@ -297,7 +297,7 @@ SBData::GetUnsignedInt64 (lldb::SBError& error, uint32_t offset) } if (log) log->Printf ("SBData::GetUnsignedInt64 (error=%p,offset=%d) => " - "(%q)", error.get(), offset, value); + "(%lld)", error.get(), offset, value); return value; } @@ -385,7 +385,7 @@ SBData::GetSignedInt64 (lldb::SBError& error, uint32_t offset) } if (log) log->Printf ("SBData::GetSignedInt64 (error=%p,offset=%d) => " - "(%q)", error.get(), offset, value); + "(%lld)", error.get(), offset, value); return value; } @@ -453,7 +453,7 @@ SBData::ReadRawData (lldb::SBError& error, error.SetErrorString("unable to read data"); } if (log) - log->Printf ("SBData::ReadRawData (error=%p,offset=%d,buf=%p,size=%d) => " + log->Printf ("SBData::ReadRawData (error=%p,offset=%d,buf=%p,size=%lu) => " "(%p)", error.get(), offset, buf, size, ok); return ok ? size : 0; } @@ -471,7 +471,7 @@ SBData::SetData(lldb::SBError& error, else m_opaque_sp->SetData(buf, size, endian); if (log) - log->Printf ("SBData::SetData (error=%p,buf=%p,size=%d,endian=%d,addr_size=%c) => " + log->Printf ("SBData::SetData (error=%p,buf=%p,size=%lu,endian=%d,addr_size=%c) => " "(%p)", error.get(), buf, size, endian, addr_size, m_opaque_sp.get()); } diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp index 180a5afa83f..c9062bd0a21 100644 --- a/lldb/source/API/SBProcess.cpp +++ b/lldb/source/API/SBProcess.cpp @@ -246,7 +246,7 @@ SBProcess::PutSTDIN (const char *src, size_t src_len) } if (log) - log->Printf ("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %d", + log->Printf ("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %lu", m_opaque_sp.get(), src, (uint32_t) src_len, diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 3343b48a623..5f3716c4e1a 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -646,7 +646,7 @@ SBTarget::BreakpointCreateByAddress (addr_t address) if (log) { - log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (%p, address=%p) => SBBreakpoint(%p)", m_opaque_sp.get(), address, sb_bp.get()); + log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (address=%llu) => SBBreakpoint(%p)", m_opaque_sp.get(), (uint64_t) address, sb_bp.get()); } return sb_bp; diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp index 3f6a751d641..6b498c12a92 100644 --- a/lldb/source/API/SBThread.cpp +++ b/lldb/source/API/SBThread.cpp @@ -729,7 +729,7 @@ SBThread::StepOverUntil (lldb::SBFrame &sb_frame, if (all_in_function) { step_file_spec.GetPath (path, sizeof(path)); - sb_error.SetErrorStringWithFormat("No line entries for %s:u", path, line); + sb_error.SetErrorStringWithFormat("No line entries for %s:%u", path, line); } else sb_error.SetErrorString ("Step until target not in current function.\n"); diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 6fba661a832..f1905856e2a 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -106,7 +106,7 @@ SBValue::GetName() if (name) log->Printf ("SBValue(%p)::GetName () => \"%s\"", m_opaque_sp.get(), name); else - log->Printf ("SBValue(%p)::GetName () => NULL", m_opaque_sp.get(), name); + log->Printf ("SBValue(%p)::GetName () => NULL", m_opaque_sp.get()); } return name; @@ -357,7 +357,7 @@ SBValue::CreateChildAtOffset (const char *name, uint32_t offset, SBType type) if (log) { if (result.IsValid()) - log->Printf ("SBValue(%p)::GetChildAtOffset => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get()); + log->Printf ("SBValue(%p)::GetChildAtOffset => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString()); else log->Printf ("SBValue(%p)::GetChildAtOffset => NULL", m_opaque_sp.get()); } @@ -391,7 +391,7 @@ SBValue::CreateValueFromExpression (const char *name, const char* expression) if (log) { if (result.IsValid()) - log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get()); + log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString()); else log->Printf ("SBValue(%p)::GetChildFromExpression => NULL", m_opaque_sp.get()); } @@ -433,7 +433,7 @@ SBValue::CreateValueFromAddress(const char* name, lldb::addr_t address, SBType t if (log) { if (result.IsValid()) - log->Printf ("SBValue(%p)::GetChildFromAddress => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get()); + log->Printf ("SBValue(%p)::GetChildFromAddress => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString()); else log->Printf ("SBValue(%p)::GetChildFromAddress => NULL", m_opaque_sp.get()); } @@ -463,7 +463,7 @@ SBValue::CreateValueFromData (const char* name, SBData data, SBType type) if (log) { if (result.IsValid()) - log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp.get()); + log->Printf ("SBValue(%p)::GetChildFromExpression => \"%s\"", m_opaque_sp.get(), result.m_opaque_sp->GetName().AsCString()); else log->Printf ("SBValue(%p)::GetChildFromExpression => NULL", m_opaque_sp.get()); } @@ -541,7 +541,7 @@ SBValue::GetIndexOfChildWithName (const char *name) if (log) { if (idx == UINT32_MAX) - log->Printf ("SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => NOT FOUND", m_opaque_sp.get(), name, idx); + log->Printf ("SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => NOT FOUND", m_opaque_sp.get(), name); else log->Printf ("SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => %u", m_opaque_sp.get(), name, idx); } diff --git a/lldb/source/Breakpoint/BreakpointList.cpp b/lldb/source/Breakpoint/BreakpointList.cpp index ff0738a44ee..4c9fa065c5d 100644 --- a/lldb/source/Breakpoint/BreakpointList.cpp +++ b/lldb/source/Breakpoint/BreakpointList.cpp @@ -154,7 +154,7 @@ void BreakpointList::Dump (Stream *s) const { Mutex::Locker locker(m_mutex); - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); s->Printf("BreakpointList with %u Breakpoints:\n", (uint32_t)m_breakpoints.size()); s->IndentMore(); diff --git a/lldb/source/Breakpoint/BreakpointLocationList.cpp b/lldb/source/Breakpoint/BreakpointLocationList.cpp index f71382f8a80..54824dd4f4e 100644 --- a/lldb/source/Breakpoint/BreakpointLocationList.cpp +++ b/lldb/source/Breakpoint/BreakpointLocationList.cpp @@ -123,7 +123,7 @@ BreakpointLocationList::FindByAddress (const Address &addr) const void BreakpointLocationList::Dump (Stream *s) const { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); //s->Indent(); Mutex::Locker locker (m_mutex); s->Printf("BreakpointLocationList with %zu BreakpointLocations:\n", m_locations.size()); diff --git a/lldb/source/Breakpoint/BreakpointSiteList.cpp b/lldb/source/Breakpoint/BreakpointSiteList.cpp index a8858f71d69..758521dd044 100644 --- a/lldb/source/Breakpoint/BreakpointSiteList.cpp +++ b/lldb/source/Breakpoint/BreakpointSiteList.cpp @@ -167,7 +167,7 @@ BreakpointSiteList::FindByAddress (lldb::addr_t addr) void BreakpointSiteList::Dump (Stream *s) const { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); //s->Indent(); s->Printf("BreakpointSiteList with %u BreakpointSites:\n", (uint32_t)m_bp_site_list.size()); s->IndentMore(); diff --git a/lldb/source/Breakpoint/WatchpointLocationList.cpp b/lldb/source/Breakpoint/WatchpointLocationList.cpp index 1664d5b4db3..c39bd5861c1 100644 --- a/lldb/source/Breakpoint/WatchpointLocationList.cpp +++ b/lldb/source/Breakpoint/WatchpointLocationList.cpp @@ -69,7 +69,7 @@ void WatchpointLocationList::DumpWithLevel (Stream *s, lldb::DescriptionLevel description_level) const { Mutex::Locker locker (m_mutex); - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); //s->Indent(); s->Printf("WatchpointLocationList with %zu WatchpointLocations:\n", m_address_to_location.size()); diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 88a130d3982..2b9643ebe3d 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -885,7 +885,7 @@ CommandObjectBreakpointEnable::Execute { // No breakpoint selected; enable all currently set breakpoints. target->EnableAllBreakpoints (); - result.AppendMessageWithFormat ("All breakpoints enabled. (%d breakpoints)\n", num_breakpoints); + result.AppendMessageWithFormat ("All breakpoints enabled. (%lu breakpoints)\n", num_breakpoints); result.SetStatus (eReturnStatusSuccessFinishNoResult); } else @@ -998,7 +998,7 @@ CommandObjectBreakpointDisable::Execute { // No breakpoint selected; disable all currently set breakpoints. target->DisableAllBreakpoints (); - result.AppendMessageWithFormat ("All breakpoints disabled. (%d breakpoints)\n", num_breakpoints); + result.AppendMessageWithFormat ("All breakpoints disabled. (%lu breakpoints)\n", num_breakpoints); result.SetStatus (eReturnStatusSuccessFinishNoResult); } else @@ -1301,7 +1301,7 @@ CommandObjectBreakpointDelete::Execute else { target->RemoveAllBreakpoints (); - result.AppendMessageWithFormat ("All breakpoints removed. (%d breakpoints)\n", num_breakpoints); + result.AppendMessageWithFormat ("All breakpoints removed. (%lu breakpoints)\n", num_breakpoints); } result.SetStatus (eReturnStatusSuccessFinishNoResult); } diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 32ac9a24aa5..f6a1846013d 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -547,7 +547,7 @@ public: } else if (m_memory_options.m_count.OptionWasSet()) { - result.AppendErrorWithFormat("specify either the end address (0x%llx) or the count (--count %u), not both.\n", end_addr, item_count); + result.AppendErrorWithFormat("specify either the end address (0x%llx) or the count (--count %lu), not both.\n", end_addr, item_count); result.SetStatus(eReturnStatusFailed); return false; } @@ -572,7 +572,7 @@ public: } if (bytes_read < total_byte_size) - result.AppendWarningWithFormat("Not all bytes (%u/%u) were able to be read from 0x%llx.\n", bytes_read, total_byte_size, addr); + result.AppendWarningWithFormat("Not all bytes (%lu/%lu) were able to be read from 0x%llx.\n", bytes_read, total_byte_size, addr); } StreamFile outfile_stream; @@ -1012,7 +1012,7 @@ public: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value 0x%llx is too large to fit in a %u byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat ("Value 0x%llx is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1040,7 +1040,7 @@ public: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value 0x%llx is too large to fit in a %u byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat ("Value 0x%llx is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1080,7 +1080,7 @@ public: } else if (!SIntValueIsValidForSize (sval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value %lli is too large or small to fit in a %u byte signed integer value.\n", sval64, item_byte_size); + result.AppendErrorWithFormat ("Value %lli is too large or small to fit in a %lu byte signed integer value.\n", sval64, item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1097,7 +1097,7 @@ public: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value %llu is too large to fit in a %u byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat ("Value %llu is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } @@ -1114,7 +1114,7 @@ public: } else if (!UIntValueIsValidForSize (uval64, item_byte_size)) { - result.AppendErrorWithFormat ("Value %llo is too large to fit in a %u byte unsigned integer value.\n", uval64, item_byte_size); + result.AppendErrorWithFormat ("Value %llo is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size); result.SetStatus(eReturnStatusFailed); return false; } diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 2f5c1b21a71..314598471c1 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -610,7 +610,7 @@ public: if (command.GetArgumentCount()) { - result.AppendErrorWithFormat("Invalid arguments for '%s'.\nUsage: \n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); + result.AppendErrorWithFormat("Invalid arguments for '%s'.\nUsage: %s\n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); result.SetStatus (eReturnStatusFailed); } else @@ -733,9 +733,7 @@ public: } else { - result.AppendErrorWithFormat ("No PID specified for attach\n", - attach_pid, - error.AsCString()); + result.AppendErrorWithFormat ("No PID specified for attach\n"); result.SetStatus (eReturnStatusFailed); } @@ -1081,15 +1079,14 @@ public: } else { - result.AppendErrorWithFormat ("Unable to find process plug-in for remote URL '%s'.\nPlease specify a process plug-in name with the --plugin option, or specify an object file using the \"file\" command: \n", - m_cmd_name.c_str(), - m_cmd_syntax.c_str()); + result.AppendErrorWithFormat ("Unable to find process plug-in for remote URL '%s'.\nPlease specify a process plug-in name with the --plugin option, or specify an object file using the \"file\" command.\n", + m_cmd_name.c_str()); result.SetStatus (eReturnStatusFailed); } } else { - result.AppendErrorWithFormat ("'%s' takes exactly one argument:\nUsage: \n", + result.AppendErrorWithFormat ("'%s' takes exactly one argument:\nUsage: %s\n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); result.SetStatus (eReturnStatusFailed); @@ -1317,7 +1314,7 @@ public: } else { - result.AppendErrorWithFormat("'%s' takes exactly one signal number argument:\nUsage: \n", m_cmd_name.c_str(), + result.AppendErrorWithFormat("'%s' takes exactly one signal number argument:\nUsage: %s\n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); result.SetStatus (eReturnStatusFailed); } @@ -1380,7 +1377,7 @@ public: } else { - result.AppendErrorWithFormat("'%s' takes no arguments:\nUsage: \n", + result.AppendErrorWithFormat("'%s' takes no arguments:\nUsage: %s\n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); result.SetStatus (eReturnStatusFailed); @@ -1438,7 +1435,7 @@ public: } else { - result.AppendErrorWithFormat("'%s' takes no arguments:\nUsage: \n", + result.AppendErrorWithFormat("'%s' takes no arguments:\nUsage: %s\n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); result.SetStatus (eReturnStatusFailed); diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp index e6b98faabab..aba27c14437 100644 --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -389,7 +389,7 @@ public: sc_list.GetContextAtIndex (i, scratch_sc); if (scratch_sc.function != NULL) { - s.Printf("\n%d: ", i); + s.Printf("\n%lu: ", i); scratch_sc.function->Dump (&s, true); } } diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 612e1629d5e..292b963ab2a 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -436,7 +436,7 @@ public: if (thread == NULL) { result.AppendErrorWithFormat ("Thread index %u is out of range (valid values are 0 - %u).\n", - step_thread_idx, 0, num_threads); + step_thread_idx, num_threads); result.SetStatus (eReturnStatusFailed); return false; } @@ -944,7 +944,6 @@ public: const uint32_t num_threads = process->GetThreadList().GetSize(); result.AppendErrorWithFormat ("Thread index %u is out of range (valid values are 0 - %u).\n", m_options.m_thread_idx, - 0, num_threads); result.SetStatus (eReturnStatusFailed); return false; @@ -1135,7 +1134,7 @@ public: } else if (command.GetArgumentCount() != 1) { - result.AppendErrorWithFormat("'%s' takes exactly one thread index argument:\nUsage: \n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); + result.AppendErrorWithFormat("'%s' takes exactly one thread index argument:\nUsage: %s\n", m_cmd_name.c_str(), m_cmd_syntax.c_str()); result.SetStatus (eReturnStatusFailed); return false; } diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp index 6c6b84243fd..45fe0bfc6c5 100644 --- a/lldb/source/Commands/CommandObjectType.cpp +++ b/lldb/source/Commands/CommandObjectType.cpp @@ -557,7 +557,7 @@ public: &error); if (error.Fail()) { - out_stream->Printf (error.AsCString()); + out_stream->Printf ("%s", error.AsCString()); out_stream->Flush(); return; } @@ -574,14 +574,14 @@ public: &error); if (error.Fail()) { - out_stream->Printf (error.AsCString()); + out_stream->Printf ("%s", error.AsCString()); out_stream->Flush(); return; } } else { - out_stream->Printf (error.AsCString()); + out_stream->Printf ("%s", error.AsCString()); out_stream->Flush(); return; } diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index c07901cc0d9..200ef4cf7c0 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -384,7 +384,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum break; case DumpStyleSectionPointerOffset: - s->Printf("(Section *)%.*p + ", (int)sizeof(void*) * 2, m_section); + s->Printf("(Section *)%p + ", m_section); s->Address(m_offset, addr_size); break; diff --git a/lldb/source/Core/AddressRange.cpp b/lldb/source/Core/AddressRange.cpp index 42b1b20dda6..391f611dc35 100644 --- a/lldb/source/Core/AddressRange.cpp +++ b/lldb/source/Core/AddressRange.cpp @@ -196,7 +196,7 @@ AddressRange::Dump(Stream *s, Target *target, Address::DumpStyle style, Address: void AddressRange::DumpDebug (Stream *s) const { - s->Printf("%.*p: AddressRange section = %*p, offset = 0x%16.16llx, byte_size = 0x%16.16llx\n", (int)sizeof(void*) * 2, this, (int)sizeof(void*) * 2, m_base_addr.GetSection(), m_base_addr.GetOffset(), GetByteSize()); + s->Printf("%p: AddressRange section = %p, offset = 0x%16.16llx, byte_size = 0x%16.16llx\n", this, m_base_addr.GetSection(), m_base_addr.GetOffset(), GetByteSize()); } // //bool diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp index 2cfced03800..4d5ac71a1b4 100644 --- a/lldb/source/Core/DataExtractor.cpp +++ b/lldb/source/Core/DataExtractor.cpp @@ -1414,15 +1414,15 @@ DataExtractor::Dump { switch (ch) { - case '\e': s->Printf ("\\e", (uint8_t)ch); break; - case '\a': s->Printf ("\\a", ch); break; - case '\b': s->Printf ("\\b", ch); break; - case '\f': s->Printf ("\\f", ch); break; - case '\n': s->Printf ("\\n", ch); break; - case '\r': s->Printf ("\\r", ch); break; - case '\t': s->Printf ("\\t", ch); break; - case '\v': s->Printf ("\\v", ch); break; - case '\0': s->Printf ("\\0", ch); break; + case '\e': s->Printf ("\\e"); break; + case '\a': s->Printf ("\\a"); break; + case '\b': s->Printf ("\\b"); break; + case '\f': s->Printf ("\\f"); break; + case '\n': s->Printf ("\\n"); break; + case '\r': s->Printf ("\\r"); break; + case '\t': s->Printf ("\\t"); break; + case '\v': s->Printf ("\\v"); break; + case '\0': s->Printf ("\\0"); break; default: if (item_byte_size == 1) s->Printf ("\\x%2.2x", ch); @@ -1492,15 +1492,15 @@ DataExtractor::Dump { switch (ch) { - case '\e': s->Printf ("\\e", (uint8_t)ch); break; - case '\a': s->Printf ("\\a", ch); break; - case '\b': s->Printf ("\\b", ch); break; - case '\f': s->Printf ("\\f", ch); break; - case '\n': s->Printf ("\\n", ch); break; - case '\r': s->Printf ("\\r", ch); break; - case '\t': s->Printf ("\\t", ch); break; - case '\v': s->Printf ("\\v", ch); break; - case '\0': s->Printf ("\\0", ch); break; + case '\e': s->Printf ("\\e"); break; + case '\a': s->Printf ("\\a"); break; + case '\b': s->Printf ("\\b"); break; + case '\f': s->Printf ("\\f"); break; + case '\n': s->Printf ("\\n"); break; + case '\r': s->Printf ("\\r"); break; + case '\t': s->Printf ("\\t"); break; + case '\v': s->Printf ("\\v"); break; + case '\0': s->Printf ("\\0"); break; default: s->Printf ("\\x%2.2x", ch); break; } } @@ -1521,7 +1521,7 @@ DataExtractor::Dump s->Printf("\"%s\"", cstr); else { - s->Printf("NULL", cstr); + s->Printf("NULL"); offset = UINT32_MAX; } } diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index debba813a85..c101038ca89 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -790,7 +790,7 @@ ScanBracketedRange (const char* var_name_begin, *index_lower = ::strtoul (*open_bracket_position+1, &end, 0); *index_higher = *index_lower; if (log) - log->Printf("[%d] detected, high index is same", *index_lower); + log->Printf("[%lld] detected, high index is same", *index_lower); } else if (*close_bracket_position && *close_bracket_position < var_name_end) { @@ -798,7 +798,7 @@ ScanBracketedRange (const char* var_name_begin, *index_lower = ::strtoul (*open_bracket_position+1, &end, 0); *index_higher = ::strtoul (*separator_position+1, &end, 0); if (log) - log->Printf("[%d-%d] detected", *index_lower, *index_higher); + log->Printf("[%lld-%lld] detected", *index_lower, *index_higher); } else { @@ -1267,7 +1267,7 @@ Debugger::FormatPrompt if (!item) { if (log) - log->Printf("ERROR in getting child item at index %d", index_lower); + log->Printf("ERROR in getting child item at index %lld", index_lower); } else { diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp index f537f1ea2bc..2809a9323b9 100644 --- a/lldb/source/Core/Log.cpp +++ b/lldb/source/Core/Log.cpp @@ -100,7 +100,7 @@ Log::PrintfWithFlagsVarArg (uint32_t flags, const char *format, va_list args) if (m_options.Test (LLDB_LOG_OPTION_PREPEND_TIMESTAMP)) { struct timeval tv = TimeValue::Now().GetAsTimeVal(); - header.Printf ("%9llu.%6.6llu ", tv.tv_sec, tv.tv_usec); + header.Printf ("%9ld.%6.6d ", tv.tv_sec, tv.tv_usec); } // Add the process and thread if requested diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index d54f9699a49..dc0c55c483a 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -217,7 +217,7 @@ Module::CalculateSymbolContextModule () void Module::DumpSymbolContext(Stream *s) { - s->Printf(", Module{0x%8.8x}", this); + s->Printf(", Module{%p}", this); } uint32_t diff --git a/lldb/source/Core/UserSettingsController.cpp b/lldb/source/Core/UserSettingsController.cpp index 404526b663e..332652aa305 100644 --- a/lldb/source/Core/UserSettingsController.cpp +++ b/lldb/source/Core/UserSettingsController.cpp @@ -859,9 +859,7 @@ UserSettingsController::GetAllPendingSettingValues (Stream &strm) StreamString value_str; - if (tmp_value.GetSize() == 0) - value_str.Printf (""); - else if (tmp_value.GetSize() == 1) + if (tmp_value.GetSize() == 1) value_str.Printf ("%s", tmp_value.GetStringAtIndex (0)); else { diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp index a8e5a5ce444..21acb5b3318 100644 --- a/lldb/source/Expression/ClangFunction.cpp +++ b/lldb/source/Expression/ClangFunction.cpp @@ -176,7 +176,7 @@ ClangFunction::CompileFunction (Stream &errors) } else { - errors.Printf("Could not determine type of input value %d.", i); + errors.Printf("Could not determine type of input value %lu.", i); return 1; } } @@ -335,7 +335,7 @@ ClangFunction::WriteFunctionArguments (ExecutionContext &exe_ctx, size_t num_args = arg_values.GetSize(); if (num_args != m_arg_values.GetSize()) { - errors.Printf ("Wrong number of arguments - was: %d should be: %d", num_args, m_arg_values.GetSize()); + errors.Printf ("Wrong number of arguments - was: %lu should be: %lu", num_args, m_arg_values.GetSize()); return false; } diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp index 3e3d9d44f61..742367f55b3 100644 --- a/lldb/source/Expression/ClangUserExpression.cpp +++ b/lldb/source/Expression/ClangUserExpression.cpp @@ -319,7 +319,7 @@ ClangUserExpression::Parse (Stream &error_stream, if (error_cstr && error_cstr[0]) error_stream.Printf ("error: %s\n", error_cstr); else - error_stream.Printf ("error: expression can't be interpreted or run\n", num_errors); + error_stream.Printf ("error: expression can't be interpreted or run\n"); return false; } } @@ -550,7 +550,7 @@ ClangUserExpression::Execute (Stream &error_stream, if (error_desc) error_stream.Printf ("Execution was interrupted, reason: %s.", error_desc); else - error_stream.Printf ("Execution was interrupted.", error_desc); + error_stream.Printf ("Execution was interrupted."); if (discard_on_error) error_stream.Printf ("\nThe process has been returned to the state before execution."); diff --git a/lldb/source/Expression/ClangUtilityFunction.cpp b/lldb/source/Expression/ClangUtilityFunction.cpp index d079dc43bea..0d11c91743b 100644 --- a/lldb/source/Expression/ClangUtilityFunction.cpp +++ b/lldb/source/Expression/ClangUtilityFunction.cpp @@ -173,7 +173,7 @@ ClangUtilityFunction::Install (Stream &error_stream, if (error_cstr && error_cstr[0]) error_stream.Printf ("error: %s\n", error_cstr); else - error_stream.Printf ("error: expression can't be interpreted or run\n", num_errors); + error_stream.Printf ("error: expression can't be interpreted or run\n"); return false; } } diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index b5cd852e497..037fbc1e285 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -310,8 +310,8 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb case DW_OP_const4s: s->Printf("DW_OP_const4s(0x%8.8x) ", m_data.GetU32(&offset)); break; // 0x0d 1 4-byte constant case DW_OP_const8u: s->Printf("DW_OP_const8u(0x%16.16llx) ", m_data.GetU64(&offset)); break; // 0x0e 1 8-byte constant case DW_OP_const8s: s->Printf("DW_OP_const8s(0x%16.16llx) ", m_data.GetU64(&offset)); break; // 0x0f 1 8-byte constant - case DW_OP_constu: s->Printf("DW_OP_constu(0x%x) ", m_data.GetULEB128(&offset)); break; // 0x10 1 ULEB128 constant - case DW_OP_consts: s->Printf("DW_OP_consts(0x%x) ", m_data.GetSLEB128(&offset)); break; // 0x11 1 SLEB128 constant + case DW_OP_constu: s->Printf("DW_OP_constu(0x%llx) ", m_data.GetULEB128(&offset)); break; // 0x10 1 ULEB128 constant + case DW_OP_consts: s->Printf("DW_OP_consts(0x%lld) ", m_data.GetSLEB128(&offset)); break; // 0x11 1 SLEB128 constant case DW_OP_dup: s->PutCString("DW_OP_dup"); break; // 0x12 case DW_OP_drop: s->PutCString("DW_OP_drop"); break; // 0x13 case DW_OP_over: s->PutCString("DW_OP_over"); break; // 0x14 @@ -330,7 +330,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb case DW_OP_or: s->PutCString("DW_OP_or"); break; // 0x21 case DW_OP_plus: s->PutCString("DW_OP_plus"); break; // 0x22 case DW_OP_plus_uconst: // 0x23 1 ULEB128 addend - s->Printf("DW_OP_plus_uconst(0x%x) ", m_data.GetULEB128(&offset)); + s->Printf("DW_OP_plus_uconst(0x%llx) ", m_data.GetULEB128(&offset)); break; case DW_OP_shl: s->PutCString("DW_OP_shl"); break; // 0x24 @@ -541,7 +541,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb } break; case DW_OP_piece: // 0x93 1 ULEB128 size of piece addressed - s->Printf("DW_OP_piece(0x%x)", m_data.GetULEB128(&offset)); + s->Printf("DW_OP_piece(0x%llx)", m_data.GetULEB128(&offset)); break; case DW_OP_deref_size: // 0x94 1 1-byte size of data retrieved s->Printf("DW_OP_deref_size(0x%2.2x)", m_data.GetU8(&offset)); @@ -568,7 +568,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb // case DW_OP_lo_user: s->PutCString("DW_OP_lo_user"); break; // 0xe0 // case DW_OP_hi_user: s->PutCString("DW_OP_hi_user"); break; // 0xff case DW_OP_APPLE_extern: - s->Printf("DW_OP_APPLE_extern(%u)", m_data.GetULEB128(&offset)); + s->Printf("DW_OP_APPLE_extern(%llu)", m_data.GetULEB128(&offset)); break; case DW_OP_APPLE_array_ref: s->PutCString("DW_OP_APPLE_array_ref"); @@ -589,7 +589,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb s->PutCString("DW_OP_APPLE_deref_type"); break; case DW_OP_APPLE_expr_local: // 0xF5 - ULEB128 expression local index - s->Printf("DW_OP_APPLE_expr_local(%u)", m_data.GetULEB128(&offset)); + s->Printf("DW_OP_APPLE_expr_local(%llu)", m_data.GetULEB128(&offset)); break; case DW_OP_APPLE_constf: // 0xF6 - 1 byte float size, followed by constant float data { @@ -1029,7 +1029,7 @@ DWARFExpression::Evaluate if (log) { size_t count = stack.size(); - log->Printf("Stack before operation has %d values:", count); + log->Printf("Stack before operation has %lu values:", count); for (size_t i=0; i<count; ++i) { StreamString new_value; @@ -2856,7 +2856,7 @@ DWARFExpression::Evaluate else if (log) { size_t count = stack.size(); - log->Printf("Stack after operation has %d values:", count); + log->Printf("Stack after operation has %lu values:", count); for (size_t i=0; i<count; ++i) { StreamString new_value; diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index 4d28c042841..6a70d4df095 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -1465,7 +1465,7 @@ IRForTarget::MaybeHandleVariable (Value *llvm_value_ptr) off_t value_alignment = (ast_context->getTypeAlign(qual_type) + 7) / 8; if (log) - log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %d, align %d]", + log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %lu, align %lld]", name.c_str(), qual_type.getAsString().c_str(), PrintType(value_type).c_str(), @@ -1815,7 +1815,7 @@ IRForTarget::ReplaceStaticLiterals (llvm::BasicBlock &basic_block) } ss.flush(); - log->Printf("Found ConstantFP with size %d and raw data %s", operand_data_size, s.c_str()); + log->Printf("Found ConstantFP with size %lu and raw data %s", operand_data_size, s.c_str()); } lldb_private::DataBufferHeap data(operand_data_size, 0); @@ -2186,7 +2186,7 @@ IRForTarget::ReplaceVariables (Function &llvm_function) } if (log) - log->Printf(" \"%s\" [\"%s\"] (\"%s\") placed at %d", + log->Printf(" \"%s\" [\"%s\"] (\"%s\") placed at %lld", value->getName().str().c_str(), name.GetCString(), PrintValue(value, true).c_str(), @@ -2225,7 +2225,7 @@ IRForTarget::ReplaceVariables (Function &llvm_function) } if (log) - log->Printf("Total structure [align %d, size %d]", alignment, size); + log->Printf("Total structure [align %lld, size %lu]", alignment, size); return true; } diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index afd00c520b7..ebfbb0fe078 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -600,7 +600,7 @@ CommandObject::GetFormattedCommandArguments (Stream &str) str.Printf ("[<%s>]", names.GetData()); break; case eArgRepeatRange: - str.Printf ("<%s_1> .. <%s_n>", names.GetData()); + str.Printf ("<%s_1> .. <%s_n>", names.GetData(), names.GetData()); break; // Explicitly test for all the rest of the cases, so if new types get added we will notice the // missing case statement(s). diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 91fb9273b15..446d6779fcb 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -204,8 +204,7 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete PyRun_SimpleString (run_string.GetData()); run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import gnu_libstdcpp')", m_dictionary_name.c_str(), - interpreter.GetDebugger().GetID()); + run_string.Printf ("run_one_line (%s, 'import gnu_libstdcpp')", m_dictionary_name.c_str()); PyRun_SimpleString (run_string.GetData()); if (m_dbg_stdout != NULL) @@ -629,7 +628,7 @@ ScriptInterpreterPython::InputReaderCallback if (script_interpreter->m_embedded_python_pty.GetMasterFileDescriptor() != -1) { if (log) - log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %d", bytes, + log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %lu", bytes, bytes_len); if (bytes && bytes_len) { @@ -643,7 +642,7 @@ ScriptInterpreterPython::InputReaderCallback else { if (log) - log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %d, Master File Descriptor is bad.", + log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %lu, Master File Descriptor is bad.", bytes, bytes_len); reader.SetIsDone (true); diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 667c43553ba..e5f6155025b 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -493,7 +493,7 @@ DynamicLoaderDarwinKernel::ParseKextSummaries (const Address &kext_summary_addr, OSKextLoadedKextSummary::collection kext_summaries; LogSP log(GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER)); if (log) - log->Printf ("Adding %d modules.\n"); + log->Printf ("Adding %d modules.\n", count); Mutex::Locker locker(m_mutex); diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index b051cb002ec..10601920214 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -686,7 +686,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfosAddress (lldb::addr_t image_in DYLDImageInfo::collection image_infos; LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_DYNAMIC_LOADER)); if (log) - log->Printf ("Adding %d modules.\n"); + log->Printf ("Adding %d modules.\n", image_infos_count); Mutex::Locker locker(m_mutex); if (m_process->GetStopID() == m_dyld_image_infos_stop_id) diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 771b00dd823..ec019093eed 100644 --- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -359,11 +359,11 @@ ObjectContainerBSDArchive::ParseHeader () void ObjectContainerBSDArchive::Dump (Stream *s) const { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); const size_t num_archs = GetNumArchitectures(); const size_t num_objects = GetNumObjects(); - s->Printf("ObjectContainerBSDArchive, num_archs = %u, num_objects = %u", num_archs, num_objects); + s->Printf("ObjectContainerBSDArchive, num_archs = %lu, num_objects = %lu", num_archs, num_objects); uint32_t i; ArchSpec arch; s->IndentMore(); @@ -371,12 +371,12 @@ ObjectContainerBSDArchive::Dump (Stream *s) const { s->Indent(); GetArchitectureAtIndex(i, arch); - s->Printf("arch[%u] = %s\n", arch.GetArchitectureName()); + s->Printf("arch[%u] = %s\n", i, arch.GetArchitectureName()); } for (i=0; i<num_objects; i++) { s->Indent(); - s->Printf("object[%u] = %s\n", GetObjectNameAtIndex (i)); + s->Printf("object[%u] = %s\n", i, GetObjectNameAtIndex (i)); } s->IndentLess(); s->EOL(); diff --git a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp index 218e97e08d3..8c4359f32b0 100644 --- a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp +++ b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp @@ -156,11 +156,11 @@ ObjectContainerUniversalMachO::ParseHeader () void ObjectContainerUniversalMachO::Dump (Stream *s) const { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); const size_t num_archs = GetNumArchitectures(); const size_t num_objects = GetNumObjects(); - s->Printf("ObjectContainerUniversalMachO, num_archs = %u, num_objects = %u", num_archs, num_objects); + s->Printf("ObjectContainerUniversalMachO, num_archs = %lu, num_objects = %lu", num_archs, num_objects); uint32_t i; ArchSpec arch; s->IndentMore(); @@ -168,12 +168,12 @@ ObjectContainerUniversalMachO::Dump (Stream *s) const { s->Indent(); GetArchitectureAtIndex(i, arch); - s->Printf("arch[%u] = %s\n", arch.GetArchitectureName()); + s->Printf("arch[%u] = %s\n", i, arch.GetArchitectureName()); } for (i=0; i<num_objects; i++) { s->Indent(); - s->Printf("object[%u] = %s\n", GetObjectNameAtIndex (i)); + s->Printf("object[%u] = %s\n", i, GetObjectNameAtIndex (i)); } s->IndentLess(); s->EOL(); diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index 6c55360731c..1cd8c3b34ae 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1161,9 +1161,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.8lx\n", header.e_entry); - s->Printf("e_phoff = 0x%8.8lx\n", header.e_phoff); - s->Printf("e_shoff = 0x%8.8lx\n", header.e_shoff); + 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_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); @@ -1221,11 +1221,11 @@ void ObjectFileELF::DumpELFProgramHeader(Stream *s, const ELFProgramHeader &ph) { DumpELFProgramHeader_p_type(s, ph.p_type); - s->Printf(" %8.8lx %8.8lx %8.8lx", ph.p_offset, ph.p_vaddr, ph.p_paddr); - s->Printf(" %8.8lx %8.8lx %8.8lx (", ph.p_filesz, ph.p_memsz, ph.p_flags); + 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); DumpELFProgramHeader_p_flags(s, ph.p_flags); - s->Printf(") %8.8x", ph.p_align); + s->Printf(") %8.8llx", ph.p_align); } //---------------------------------------------------------------------- @@ -1306,11 +1306,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.8lx (", sh.sh_flags); + s->Printf(" %8.8llx (", sh.sh_flags); DumpELFSectionHeader_sh_flags(s, sh.sh_flags); - s->Printf(") %8.8lx %8.8lx %8.8lx", sh.sh_addr, sh.sh_offset, sh.sh_size); + s->Printf(") %8.8llx %8.8llx %8.8llx", sh.sh_addr, sh.sh_offset, sh.sh_size); s->Printf(" %8.8x %8.8x", sh.sh_link, sh.sh_info); - s->Printf(" %8.8lx %8.8lx", sh.sh_addralign, sh.sh_entsize); + s->Printf(" %8.8llx %8.8llx", sh.sh_addralign, sh.sh_entsize); } //---------------------------------------------------------------------- diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 420830d59f7..478859589b5 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1479,7 +1479,7 @@ void ObjectFileMachO::Dump (Stream *s) { lldb_private::Mutex::Locker locker(m_mutex); - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); if (m_header.magic == HeaderMagic64 || m_header.magic == HeaderMagic64Swapped) s->PutCString("ObjectFileMachO64"); diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 425c6682b11..91b087b25e8 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -656,7 +656,7 @@ void ObjectFilePECOFF::Dump(Stream *s) { Mutex::Locker locker(m_mutex); - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); s->PutCString("ObjectFilePECOFF"); diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp index 39624dc978a..ef9e5975e18 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -743,7 +743,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[%i] = { range = [0x%16.16llx - 0x%16.16llx), size = 0x%8.8x, prot = %s }", region_addr, region_addr + region_size, region_size, GetPermissionsAsCString (region_prot)); + 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)); } } break; diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index a37469c3856..e7fcb920d75 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -391,7 +391,7 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri { success = false; if (log) - log->Printf ("error: invalid checksum in packet: '%s'\n", (int)(total_length), m_bytes.c_str()); + log->Printf ("error: invalid checksum in packet: '%s'\n", m_bytes.c_str()); } } m_bytes.erase(0, total_length); diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 0c246f7e389..1f2ad798131 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -245,7 +245,7 @@ GDBRemoteCommunicationClient::SendPacketAndWaitForResponse else { if (log) - log->Printf("error: failed to send '%*s'", payload_length, payload); + log->Printf("error: failed to send '%*s'", (int) payload_length, payload); } } else @@ -311,13 +311,13 @@ GDBRemoteCommunicationClient::SendPacketAndWaitForResponse else { if (log) - log->Printf("error: packet mutex taken and send_async == false, not sending packet '%*s'", payload_length, payload); + log->Printf("error: packet mutex taken and send_async == false, not sending packet '%*s'", (int) payload_length, payload); } } if (response_len == 0) { if (log) - log->Printf("error: failed to get response for '%*s'", payload_length, payload); + log->Printf("error: failed to get response for '%*s'", (int) payload_length, payload); } return response_len; } @@ -385,7 +385,7 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse got_stdout = false; if (log) - log->Printf ("GDBRemoteCommunicationClient::%s () WaitForPacket(%.*s)", __FUNCTION__); + log->Printf ("GDBRemoteCommunicationClient::%s () WaitForPacket(%s)", __FUNCTION__, continue_packet.c_str()); if (WaitForPacketWithTimeoutMicroSeconds (response, UINT32_MAX)) { diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 1fbcf5696aa..8f09fcf9d8c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1737,7 +1737,7 @@ ProcessGDBRemote::GetSTDOUT (char *buf, size_t buf_size, Error &error) { LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS)); if (log) - log->Printf ("ProcessGDBRemote::%s (&%p[%u]) ...", __FUNCTION__, buf, buf_size); + log->Printf ("ProcessGDBRemote::%s (&%p[%lu]) ...", __FUNCTION__, buf, buf_size); if (bytes_available > buf_size) { memcpy(buf, m_stdout_data.c_str(), buf_size); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp index 29db0a7a647..8f7335376d4 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -885,7 +885,7 @@ DWARFDebugInfo::Verify(Stream *s, SymbolFileDWARF* dwarf2Data) } s->Printf("-------- -------- -------- -------------------------------------------\n"); - s->Printf("%7u %8u 100.00% Total for all DIEs\n", total_die_count, total_die_size); + s->Printf("%7u %8u 100.00%% Total for all DIEs\n", total_die_count, total_die_size); float total_category_percentages[kNumTagCategories] = { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index 22d0d22b657..152867a5467 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -1146,7 +1146,7 @@ DWARFDebugInfoEntry::DumpLocation if (obj_file) obj_file_name = obj_file->GetFileSpec().GetFilename().AsCString(); const char *die_name = GetName (dwarf2Data, cu); - s.Printf ("CU: %s OBJFILE: %s DIE: %s (0x%llx).", + s.Printf ("CU: %s OBJFILE: %s DIE: %s (0x%x).", cu_name ? cu_name : "<UNKNOWN>", obj_file_name ? obj_file_name : "<UNKNOWN>", die_name ? die_name : "<NO NAME>", @@ -1215,7 +1215,7 @@ DWARFDebugInfoEntry::DumpAttribute { case DW_AT_stmt_list: if ( verbose ) s.PutCString(" ( "); - s.Printf( "0x%8.8x", form_value.Unsigned()); + s.Printf( "0x%8.8llx", form_value.Unsigned()); if ( verbose ) s.PutCString(" )"); break; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index 675c4bc09e0..05688d4c19a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -274,7 +274,7 @@ DWARFDebugLine::DumpStatementOpcodes(Log *log, const DataExtractor& debug_line_d { dw_uleb128_t addr_offset_n = debug_line_data.GetULEB128(&offset); dw_uleb128_t addr_offset = addr_offset_n * prologue.min_inst_length; - log->Printf( "0x%8.8x: DW_LNS_advance_pc (0x%llx)", op_offset, addr_offset); + log->Printf( "0x%8.8x: DW_LNS_advance_pc (0x%x)", op_offset, addr_offset); row.address += addr_offset; } break; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp index c07cec45c2a..0aaeb7e0249 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacinfoEntry.cpp @@ -65,7 +65,7 @@ DWARFDebugMacinfoEntry::Dump(Stream *s) const break; case DW_MACINFO_start_file: - s->Printf(" line:%u file index: '%s'\n", (uint32_t)m_line, (uint32_t)m_op2.file_idx); + s->Printf(" line:%u file index: '%u'\n", (uint32_t)m_line, (uint32_t)m_op2.file_idx); break; case DW_MACINFO_end_file: diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index 018b9e095d5..ac417e5cc1e 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -437,7 +437,7 @@ DWARFFormValue::Dump(Stream &s, const DataExtractor* debug_str_data, const DWARF if (verbose) s.PutCString(" => "); - s.Printf("{0x%8.8x}", (uvalue + (cu ? cu->GetOffset() : 0))); + s.Printf("{0x%8.8llx}", (uvalue + (cu ? cu->GetOffset() : 0))); } } diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp index 8cca445170d..d1e4d401498 100644 --- a/lldb/source/Symbol/Block.cpp +++ b/lldb/source/Symbol/Block.cpp @@ -78,7 +78,7 @@ Block::Dump(Stream *s, addr_t base_addr, int32_t depth, bool show_context) const } } - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); *s << "Block" << ((const UserID&)*this); const Block* parent_block = GetParent(); diff --git a/lldb/source/Symbol/CompileUnit.cpp b/lldb/source/Symbol/CompileUnit.cpp index 8f51210bea8..d50ad99dc5e 100644 --- a/lldb/source/Symbol/CompileUnit.cpp +++ b/lldb/source/Symbol/CompileUnit.cpp @@ -93,7 +93,7 @@ CompileUnit::GetDescription(Stream *s, lldb::DescriptionLevel level) const void CompileUnit::Dump(Stream *s, bool show_context) const { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); *s << "CompileUnit" << (const UserID&)*this << ", language = \"" << (const Language&)*this diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp index fd4e15f5ea7..85c4839a9b5 100644 --- a/lldb/source/Symbol/Function.cpp +++ b/lldb/source/Symbol/Function.cpp @@ -355,7 +355,7 @@ Function::GetDescription(Stream *s, lldb::DescriptionLevel level, Target *target void Function::Dump(Stream *s, bool show_context) const { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); *s << "Function" << (const UserID&)*this; @@ -363,7 +363,7 @@ Function::Dump(Stream *s, bool show_context) const if (m_type) { - s->Printf(", type = %.*p", (int)sizeof(void*) * 2, m_type); + s->Printf(", type = %p", m_type); } else if (m_type_uid != LLDB_INVALID_UID) { diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp index 23722f6f75a..45a5f52c3bf 100644 --- a/lldb/source/Symbol/SymbolContext.cpp +++ b/lldb/source/Symbol/SymbolContext.cpp @@ -749,15 +749,15 @@ SymbolContextSpecifier::GetDescription (Stream *s, lldb::DescriptionLevel level) s->Printf ("File: %s", path_str); if (m_type == eLineStartSpecified) { - s->Printf (" from line %d", m_start_line); + s->Printf (" from line %lu", m_start_line); if (m_type == eLineEndSpecified) - s->Printf ("to line %d", m_end_line); + s->Printf ("to line %lu", m_end_line); else - s->Printf ("to end", m_end_line); + s->Printf ("to end"); } else if (m_type == eLineEndSpecified) { - s->Printf (" from start to line %d", m_end_line); + s->Printf (" from start to line %ld", m_end_line); } s->Printf (".\n"); } @@ -765,16 +765,16 @@ SymbolContextSpecifier::GetDescription (Stream *s, lldb::DescriptionLevel level) if (m_type == eLineStartSpecified) { s->Indent(); - s->Printf ("From line %d", m_start_line); + s->Printf ("From line %lu", m_start_line); if (m_type == eLineEndSpecified) - s->Printf ("to line %d", m_end_line); + s->Printf ("to line %lu", m_end_line); else - s->Printf ("to end", m_end_line); + s->Printf ("to end"); s->Printf (".\n"); } else if (m_type == eLineEndSpecified) { - s->Printf ("From start to line %d.\n", m_end_line); + s->Printf ("From start to line %ld.\n", m_end_line); } if (m_type == eFunctionSpecified) diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp index b228780e8de..4c236400d62 100644 --- a/lldb/source/Symbol/SymbolVendor.cpp +++ b/lldb/source/Symbol/SymbolVendor.cpp @@ -279,7 +279,7 @@ SymbolVendor::Dump(Stream *s) Mutex::Locker locker(m_mutex); bool show_context = false; - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); s->PutCString("SymbolVendor"); if (m_sym_file_ap.get()) diff --git a/lldb/source/Symbol/Symtab.cpp b/lldb/source/Symbol/Symtab.cpp index 6c81cc1e398..9ce0df957d7 100644 --- a/lldb/source/Symbol/Symtab.cpp +++ b/lldb/source/Symbol/Symtab.cpp @@ -87,7 +87,7 @@ Symtab::Dump (Stream *s, Target *target, SortOrder sort_order) object_name = m_objfile->GetModule()->GetObjectName().GetCString(); if (file_spec) - s->Printf("Symtab, file = %s/%s%s%s%s, num_symbols = %u", + s->Printf("Symtab, file = %s/%s%s%s%s, num_symbols = %lu", file_spec.GetDirectory().AsCString(), file_spec.GetFilename().AsCString(), object_name ? "(" : "", @@ -95,7 +95,7 @@ Symtab::Dump (Stream *s, Target *target, SortOrder sort_order) object_name ? ")" : "", m_symbols.size()); else - s->Printf("Symtab, num_symbols = %u", m_symbols.size()); + s->Printf("Symtab, num_symbols = %lu", m_symbols.size()); if (!m_symbols.empty()) { @@ -169,7 +169,7 @@ Symtab::Dump(Stream *s, Target *target, std::vector<uint32_t>& indexes) const const size_t num_symbols = GetNumSymbols(); //s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); s->Indent(); - s->Printf("Symtab %u symbol indexes (%u symbols total):\n", indexes.size(), m_symbols.size()); + s->Printf("Symtab %lu symbol indexes (%lu symbols total):\n", indexes.size(), m_symbols.size()); s->IndentMore(); if (!indexes.empty()) diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp index 46d8700db80..dbe15ef9b62 100644 --- a/lldb/source/Symbol/Type.cpp +++ b/lldb/source/Symbol/Type.cpp @@ -142,7 +142,7 @@ Type::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_name) void Type::Dump (Stream *s, bool show_context) { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); *s << "Type" << (const UserID&)*this << ' '; if (m_name) diff --git a/lldb/source/Symbol/UnwindPlan.cpp b/lldb/source/Symbol/UnwindPlan.cpp index 01cb737b8b2..2ea11b87faf 100644 --- a/lldb/source/Symbol/UnwindPlan.cpp +++ b/lldb/source/Symbol/UnwindPlan.cpp @@ -166,7 +166,7 @@ UnwindPlan::Row::Dump (Stream& s, const UnwindPlan* unwind_plan, Thread* thread, if (base_addr != LLDB_INVALID_ADDRESS) s.Printf ("0x%16.16llx: CFA=", base_addr + GetOffset()); else - s.Printf ("0x%8.8x: CFA=", GetOffset()); + s.Printf ("0x%8.8llx: CFA=", GetOffset()); if (reg_info) s.Printf ("%s", reg_info->name); diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp index e7524850aec..d5bba289e59 100644 --- a/lldb/source/Symbol/Variable.cpp +++ b/lldb/source/Symbol/Variable.cpp @@ -84,7 +84,7 @@ Variable::NameMatches (const RegularExpression& regex) const void Variable::Dump(Stream *s, bool show_context) const { - s->Printf("%.*p: ", (int)sizeof(void*) * 2, this); + s->Printf("%p: ", this); s->Indent(); *s << "Variable" << (const UserID&)*this; diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 417c274d5dd..14f26d24c26 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -167,7 +167,7 @@ ProcessInstanceInfo::DumpAsTableRow (Stream &s, Platform *platform, bool show_ar } else { - s.Printf ("%-10s %.*-7s ", + s.Printf ("%-10s %-7d %s ", platform->GetUserName (m_euid), (int)m_arch.GetTriple().getArchName().size(), m_arch.GetTriple().getArchName().data()); @@ -1107,7 +1107,7 @@ Process::SetPrivateState (StateType new_state) else { if (log) - log->Printf("Process::SetPrivateState (%s) state didn't change. Ignoring...", StateAsCString(new_state), StateAsCString(old_state)); + log->Printf("Process::SetPrivateState (%s) state didn't change. Ignoring...", StateAsCString(new_state)); } } @@ -2682,7 +2682,7 @@ Process::ShouldBroadcastEvent (Event *event_ptr) } if (log) - log->Printf ("Process::ShouldBroadcastEvent (%p) => %s", event_ptr, StateAsCString(state), return_value ? "YES" : "NO"); + log->Printf ("Process::ShouldBroadcastEvent (%p) => %s - %s", event_ptr, StateAsCString(state), return_value ? "YES" : "NO"); return return_value; } @@ -2830,8 +2830,7 @@ Process::HandlePrivateEvent (EventSP &event_sp) __FUNCTION__, GetID(), StateAsCString(new_state), - StateAsCString (GetState ()), - IsHijackedForEvent(eBroadcastBitStateChanged) ? "hijacked" : "public"); + StateAsCString (GetState ())); } } } diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp index a19106e2098..3f747812240 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -266,7 +266,7 @@ StackFrameList::Dump (Stream *s) frame->DumpUsingSettingsFormat (s); } else - s->Printf("frame #%u", std::distance (begin, pos)); + s->Printf("frame #%ld", std::distance (begin, pos)); s->EOL(); } s->EOL(); diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 7c29da20481..e45851993ba 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -1018,7 +1018,7 @@ Thread::UpdateInstanceName () if (name && name[0] != '\0') sstr.Printf ("%s", name); else if ((GetIndexID() != 0) || (GetID() != 0)) - sstr.Printf ("0x%4.4x", GetIndexID(), GetID()); + sstr.Printf ("0x%4.4x", GetIndexID()); if (sstr.GetSize() > 0) Thread::GetSettingsController()->RenameInstanceSettings (GetInstanceName().AsCString(), sstr.GetData()); diff --git a/lldb/source/Target/ThreadPlanStepUntil.cpp b/lldb/source/Target/ThreadPlanStepUntil.cpp index 5ad0940f09c..f54bf46d877 100644 --- a/lldb/source/Target/ThreadPlanStepUntil.cpp +++ b/lldb/source/Target/ThreadPlanStepUntil.cpp @@ -147,7 +147,7 @@ ThreadPlanStepUntil::GetDescription (Stream *s, lldb::DescriptionLevel level) s->Printf ("\n\t0x%llx (bp: %d)", (uint64_t) (*pos).first, (*pos).second); } } - s->Printf(" stepped out address is 0x%lx.", (uint64_t) m_return_addr); + s->Printf(" stepped out address is 0x%llx.", (uint64_t) m_return_addr); } } diff --git a/lldb/source/Target/ThreadSpec.cpp b/lldb/source/Target/ThreadSpec.cpp index 07abf595c8d..ca47e720807 100644 --- a/lldb/source/Target/ThreadSpec.cpp +++ b/lldb/source/Target/ThreadSpec.cpp @@ -104,7 +104,7 @@ ThreadSpec::GetDescription (Stream *s, lldb::DescriptionLevel level) const else { if (GetTID() != LLDB_INVALID_THREAD_ID) - s->Printf("tid: 0x%llx ", GetTID()); + s->Printf("tid: 0x%x ", GetTID()); if (GetIndex() != UINT32_MAX) s->Printf("index: %d ", GetIndex()); |