summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBBreakpoint.cpp6
-rw-r--r--lldb/source/API/SBCommunication.cpp21
-rw-r--r--lldb/source/API/SBDebugger.cpp7
-rw-r--r--lldb/source/API/SBFileSpec.cpp4
-rw-r--r--lldb/source/API/SBProcess.cpp36
-rw-r--r--lldb/source/API/SBValue.cpp2
-rw-r--r--lldb/source/Breakpoint/Breakpoint.cpp4
-rw-r--r--lldb/source/Breakpoint/BreakpointLocationList.cpp2
-rw-r--r--lldb/source/Breakpoint/WatchpointList.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp6
-rw-r--r--lldb/source/Core/Communication.cpp12
-rw-r--r--lldb/source/Core/ConnectionFileDescriptor.cpp30
-rw-r--r--lldb/source/Core/ConstString.cpp2
-rw-r--r--lldb/source/Core/EmulateInstruction.cpp4
-rw-r--r--lldb/source/Core/Module.cpp2
-rw-r--r--lldb/source/Expression/ClangFunction.cpp2
-rw-r--r--lldb/source/Expression/DWARFExpression.cpp4
-rw-r--r--lldb/source/Host/macosx/Host.mm2
-rw-r--r--lldb/source/Interpreter/Args.cpp9
-rw-r--r--lldb/source/Interpreter/OptionValueArray.cpp4
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp6
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp4
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp3
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp8
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp6
-rw-r--r--lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp4
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp2
-rw-r--r--lldb/source/Target/Memory.cpp3
-rw-r--r--lldb/source/Target/Process.cpp4
-rw-r--r--lldb/source/Target/Target.cpp6
-rw-r--r--lldb/source/Target/ThreadList.cpp4
33 files changed, 116 insertions, 109 deletions
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 6fc4cd953b1..d9a92d413ca 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -440,7 +440,7 @@ SBBreakpoint::GetNumResolvedLocations() const
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %zu", m_opaque_sp.get(), num_resolved);
+ log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_resolved);
return num_resolved;
}
@@ -455,7 +455,7 @@ SBBreakpoint::GetNumLocations() const
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %zu", m_opaque_sp.get(), num_locs);
+ log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_locs);
return num_locs;
}
@@ -469,7 +469,7 @@ SBBreakpoint::GetDescription (SBStream &s)
m_opaque_sp->GetResolverDescription (s.get());
m_opaque_sp->GetFilterDescription (s.get());
const size_t num_locations = m_opaque_sp->GetNumLocations ();
- s.Printf(", locations = %zu", num_locations);
+ s.Printf(", locations = %llu", (uint64_t)num_locations);
return true;
}
s.Printf ("No value");
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index bf3a49e719e..80f557c15bb 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -139,8 +139,11 @@ SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, Connect
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%zu, timeout_usec=%u, &status)...",
- m_opaque, dst, dst_len, timeout_usec);
+ log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%llu, timeout_usec=%u, &status)...",
+ m_opaque,
+ dst,
+ (uint64_t)dst_len,
+ timeout_usec);
size_t bytes_read = 0;
if (m_opaque)
bytes_read = m_opaque->Read (dst, dst_len, timeout_usec, status, NULL);
@@ -148,9 +151,13 @@ SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, Connect
status = eConnectionStatusNoConnection;
if (log)
- log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%zu, timeout_usec=%u, &status=%s) => %zu",
- m_opaque, dst, dst_len, timeout_usec, Communication::ConnectionStatusAsCString (status),
- bytes_read);
+ log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%llu, timeout_usec=%u, &status=%s) => %llu",
+ m_opaque,
+ dst,
+ (uint64_t)dst_len,
+ timeout_usec,
+ Communication::ConnectionStatusAsCString (status),
+ (uint64_t)bytes_read);
return bytes_read;
}
@@ -166,8 +173,8 @@ SBCommunication::Write (const void *src, size_t src_len, ConnectionStatus &statu
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%zu, &status=%s) => %zu",
- m_opaque, src, src_len, Communication::ConnectionStatusAsCString (status), bytes_written);
+ log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%llu, &status=%s) => %llu",
+ m_opaque, src, (uint64_t)src_len, Communication::ConnectionStatusAsCString (status), (uint64_t)bytes_written);
return 0;
}
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 194e48c314c..ca39d2a80d6 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -805,8 +805,11 @@ SBDebugger::DispatchInput (const void *data, size_t data_len)
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%zu)", m_opaque_sp.get(),
- (int) data_len, (const char *) data, data_len);
+ log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%llu)",
+ m_opaque_sp.get(),
+ (int) data_len,
+ (const char *) data,
+ (uint64_t)data_len);
if (m_opaque_sp)
m_opaque_sp->DispatchInput ((const char *) data, data_len);
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp
index a6c753caa00..d494846687e 100644
--- a/lldb/source/API/SBFileSpec.cpp
+++ b/lldb/source/API/SBFileSpec.cpp
@@ -154,8 +154,8 @@ SBFileSpec::GetPath (char *dst_path, size_t dst_len) const
result = m_opaque_ap->GetPath (dst_path, dst_len);
if (log)
- log->Printf ("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%zu) => %u",
- m_opaque_ap.get(), result, dst_path, dst_len, result);
+ log->Printf ("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%llu) => %u",
+ m_opaque_ap.get(), result, dst_path, (uint64_t)dst_len, result);
if (result == 0 && dst_path && dst_len > 0)
*dst_path = '\0';
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 7130e334825..f2613dd08ed 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -310,8 +310,12 @@ SBProcess::GetSTDOUT (char *dst, size_t dst_len) const
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%zu) => %zu",
- process_sp.get(), (int) bytes_read, dst, dst_len, bytes_read);
+ log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%llu) => %llu",
+ process_sp.get(),
+ (int) bytes_read,
+ dst,
+ (uint64_t)dst_len,
+ (uint64_t)bytes_read);
return bytes_read;
}
@@ -329,8 +333,12 @@ SBProcess::GetSTDERR (char *dst, size_t dst_len) const
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
- log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%zu) => %zu",
- process_sp.get(), (int) bytes_read, dst, dst_len, bytes_read);
+ log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%llu) => %llu",
+ process_sp.get(),
+ (int) bytes_read,
+ dst,
+ (uint64_t)dst_len,
+ (uint64_t)bytes_read);
return bytes_read;
}
@@ -850,11 +858,11 @@ SBProcess::ReadMemory (addr_t addr, void *dst, size_t dst_len, SBError &sb_error
if (log)
{
- log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%zu, SBError (%p))...",
+ log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%llu, SBError (%p))...",
process_sp.get(),
addr,
dst,
- dst_len,
+ (uint64_t)dst_len,
sb_error.get());
}
@@ -882,14 +890,14 @@ SBProcess::ReadMemory (addr_t addr, void *dst, size_t dst_len, SBError &sb_error
{
SBStream sstr;
sb_error.GetDescription (sstr);
- log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%zu, SBError (%p): %s) => %zu",
+ log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%llu, SBError (%p): %s) => %llu",
process_sp.get(),
addr,
dst,
- dst_len,
+ (uint64_t)dst_len,
sb_error.get(),
sstr.GetData(),
- bytes_read);
+ (uint64_t)bytes_read);
}
return bytes_read;
@@ -990,11 +998,11 @@ SBProcess::WriteMemory (addr_t addr, const void *src, size_t src_len, SBError &s
if (log)
{
- log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, dst_len=%zu, SBError (%p))...",
+ log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, src_len=%llu, SBError (%p))...",
process_sp.get(),
addr,
src,
- src_len,
+ (uint64_t)src_len,
sb_error.get());
}
@@ -1018,14 +1026,14 @@ SBProcess::WriteMemory (addr_t addr, const void *src, size_t src_len, SBError &s
{
SBStream sstr;
sb_error.GetDescription (sstr);
- log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, dst_len=%zu, SBError (%p): %s) => %zu",
+ log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, src_len=%llu, SBError (%p): %s) => %llu",
process_sp.get(),
addr,
src,
- src_len,
+ (uint64_t)src_len,
sb_error.get(),
sstr.GetData(),
- bytes_written);
+ (uint64_t)bytes_written);
}
return bytes_written;
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 46f5e07ebdc..3f2a37953be 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -206,7 +206,7 @@ SBValue::GetByteSize ()
}
if (log)
- log->Printf ("SBValue(%p)::GetByteSize () => %zu", value_sp.get(), result);
+ log->Printf ("SBValue(%p)::GetByteSize () => %llu", value_sp.get(), (uint64_t)result);
return result;
}
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index 095924fc359..e1582585078 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -525,9 +525,9 @@ Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_l
case lldb::eDescriptionLevelFull:
if (num_locations > 0)
{
- s->Printf(", locations = %zu", num_locations);
+ s->Printf(", locations = %llu", (uint64_t)num_locations);
if (num_resolved_locations > 0)
- s->Printf(", resolved = %zu", num_resolved_locations);
+ s->Printf(", resolved = %llu", (uint64_t)num_resolved_locations);
}
else
{
diff --git a/lldb/source/Breakpoint/BreakpointLocationList.cpp b/lldb/source/Breakpoint/BreakpointLocationList.cpp
index 8329912b11b..908ed874e70 100644
--- a/lldb/source/Breakpoint/BreakpointLocationList.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocationList.cpp
@@ -128,7 +128,7 @@ BreakpointLocationList::Dump (Stream *s) const
s->Printf("%p: ", this);
//s->Indent();
Mutex::Locker locker (m_mutex);
- s->Printf("BreakpointLocationList with %zu BreakpointLocations:\n", m_locations.size());
+ s->Printf("BreakpointLocationList with %llu BreakpointLocations:\n", (uint64_t)m_locations.size());
s->IndentMore();
collection::const_iterator pos, end = m_locations.end();
for (pos = m_locations.begin(); pos != end; ++pos)
diff --git a/lldb/source/Breakpoint/WatchpointList.cpp b/lldb/source/Breakpoint/WatchpointList.cpp
index bfd0b4cdc5d..637cdca6c0b 100644
--- a/lldb/source/Breakpoint/WatchpointList.cpp
+++ b/lldb/source/Breakpoint/WatchpointList.cpp
@@ -51,8 +51,8 @@ WatchpointList::DumpWithLevel (Stream *s, lldb::DescriptionLevel description_lev
Mutex::Locker locker (m_mutex);
s->Printf("%p: ", this);
//s->Indent();
- s->Printf("WatchpointList with %zu Watchpoints:\n",
- m_watchpoints.size());
+ s->Printf("WatchpointList with %llu Watchpoints:\n",
+ (uint64_t)m_watchpoints.size());
s->IndentMore();
wp_collection::const_iterator pos, end = m_watchpoints.end();
for (pos = m_watchpoints.begin(); pos != end; ++pos)
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index ef1709f120b..7c14dceee86 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -703,7 +703,7 @@ protected:
}
else
{
- result.AppendErrorWithFormat("Failed to write %zu bytes to '%s'.\n", bytes_read, path);
+ result.AppendErrorWithFormat("Failed to write %llu bytes to '%s'.\n", (uint64_t)bytes_read, path);
result.SetStatus(eReturnStatusFailed);
return false;
}
@@ -1042,13 +1042,13 @@ protected:
if (bytes_written == length)
{
// All bytes written
- result.GetOutputStream().Printf("%zu bytes were written to 0x%llx\n", bytes_written, addr);
+ result.GetOutputStream().Printf("%llu bytes were written to 0x%llx\n", (uint64_t)bytes_written, addr);
result.SetStatus(eReturnStatusSuccessFinishResult);
}
else if (bytes_written > 0)
{
// Some byte written
- result.GetOutputStream().Printf("%zu bytes of %zu requested were written to 0x%llx\n", bytes_written, length, addr);
+ result.GetOutputStream().Printf("%llu bytes of %llu requested were written to 0x%llx\n", (uint64_t)bytes_written, (uint64_t)length, addr);
result.SetStatus(eReturnStatusSuccessFinishResult);
}
else
diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp
index 35af6440df2..64cc2f97ebd 100644
--- a/lldb/source/Core/Communication.cpp
+++ b/lldb/source/Core/Communication.cpp
@@ -136,10 +136,10 @@ size_t
Communication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status, Error *error_ptr)
{
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
- "%p Communication::Read (dst = %p, dst_len = %zu, timeout = %u usec) connection = %p",
+ "%p Communication::Read (dst = %p, dst_len = %llu, timeout = %u usec) connection = %p",
this,
dst,
- dst_len,
+ (uint64_t)dst_len,
timeout_usec,
m_connection_sp.get());
@@ -210,10 +210,10 @@ Communication::Write (const void *src, size_t src_len, ConnectionStatus &status,
Mutex::Locker (m_write_mutex);
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
- "%p Communication::Write (src = %p, src_len = %zu) connection = %p",
+ "%p Communication::Write (src = %p, src_len = %llu) connection = %p",
this,
src,
- src_len,
+ (uint64_t)src_len,
connection_sp.get());
if (connection_sp.get())
@@ -295,8 +295,8 @@ void
Communication::AppendBytesToCache (const uint8_t * bytes, size_t len, bool broadcast, ConnectionStatus status)
{
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
- "%p Communication::AppendBytesToCache (src = %p, src_len = %zu, broadcast = %i)",
- this, bytes, len, broadcast);
+ "%p Communication::AppendBytesToCache (src = %p, src_len = %llu, broadcast = %i)",
+ this, bytes, (uint64_t)len, broadcast);
if ((bytes == NULL || len == 0)
&& (status != lldb::eConnectionStatusEndOfFile))
return;
diff --git a/lldb/source/Core/ConnectionFileDescriptor.cpp b/lldb/source/Core/ConnectionFileDescriptor.cpp
index e950be24a8e..238daabdb48 100644
--- a/lldb/source/Core/ConnectionFileDescriptor.cpp
+++ b/lldb/source/Core/ConnectionFileDescriptor.cpp
@@ -362,8 +362,8 @@ ConnectionFileDescriptor::Read (void *dst,
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
- log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %zu)...",
- this, m_fd_recv, dst, dst_len);
+ log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %llu)...",
+ this, m_fd_recv, dst, (uint64_t)dst_len);
Mutex::Locker locker;
bool got_lock = locker.TryLock (m_mutex);
@@ -411,12 +411,12 @@ ConnectionFileDescriptor::Read (void *dst,
}
if (log)
- log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %zu) => %zi, error = %s",
+ log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %llu) => %lli, error = %s",
this,
m_fd_recv,
dst,
- dst_len,
- bytes_read,
+ (uint64_t)dst_len,
+ (int64_t)bytes_read,
error.AsCString());
if (error_ptr)
@@ -475,7 +475,7 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
{
LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
if (log)
- log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %zu)", this, src, src_len);
+ log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %llu)", this, src, (uint64_t)src_len);
if (!IsConnected ())
{
@@ -530,32 +530,32 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
switch (m_fd_send_type)
{
case eFDTypeFile: // Other FD requireing read/write
- log->Printf ("%p ConnectionFileDescriptor::Write() ::write (fd = %i, src = %p, src_len = %zu) => %zi (error = %s)",
+ log->Printf ("%p ConnectionFileDescriptor::Write() ::write (fd = %i, src = %p, src_len = %llu) => %lli (error = %s)",
this,
m_fd_send,
src,
- src_len,
- bytes_sent,
+ (uint64_t)src_len,
+ (int64_t)bytes_sent,
error.AsCString());
break;
case eFDTypeSocket: // Socket requiring send/recv
- log->Printf ("%p ConnectionFileDescriptor::Write() ::send (socket = %i, src = %p, src_len = %zu, flags = 0) => %zi (error = %s)",
+ log->Printf ("%p ConnectionFileDescriptor::Write() ::send (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
this,
m_fd_send,
src,
- src_len,
- bytes_sent,
+ (uint64_t)src_len,
+ (int64_t)bytes_sent,
error.AsCString());
break;
case eFDTypeSocketUDP: // Unconnected UDP socket requiring sendto/recvfrom
- log->Printf ("%p ConnectionFileDescriptor::Write() ::sendto (socket = %i, src = %p, src_len = %zu, flags = 0) => %zi (error = %s)",
+ log->Printf ("%p ConnectionFileDescriptor::Write() ::sendto (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
this,
m_fd_send,
src,
- src_len,
- bytes_sent,
+ (uint64_t)src_len,
+ (int64_t)bytes_sent,
error.AsCString());
break;
}
diff --git a/lldb/source/Core/ConstString.cpp b/lldb/source/Core/ConstString.cpp
index d82bc61fa91..572b481d09f 100644
--- a/lldb/source/Core/ConstString.cpp
+++ b/lldb/source/Core/ConstString.cpp
@@ -291,7 +291,7 @@ ConstString::DumpDebug(Stream *s) const
size_t cstr_len = GetLength();
// Only print the parens if we have a non-NULL string
const char *parens = cstr ? "\"" : "";
- s->Printf("%*p: ConstString, string = %s%s%s, length = %zu", (int)sizeof(void*) * 2, this, parens, cstr, parens, cstr_len);
+ s->Printf("%*p: ConstString, string = %s%s%s, length = %llu", (int)sizeof(void*) * 2, this, parens, cstr, parens, (uint64_t)cstr_len);
}
void
diff --git a/lldb/source/Core/EmulateInstruction.cpp b/lldb/source/Core/EmulateInstruction.cpp
index f17924747d8..0e94e67b8d8 100644
--- a/lldb/source/Core/EmulateInstruction.cpp
+++ b/lldb/source/Core/EmulateInstruction.cpp
@@ -361,7 +361,7 @@ EmulateInstruction::ReadMemoryDefault (EmulateInstruction *instruction,
size_t length)
{
StreamFile strm (stdout, false);
- strm.Printf (" Read from Memory (address = 0x%llx, length = %zu, context = ", addr, length);
+ strm.Printf (" Read from Memory (address = 0x%llx, length = %llu, context = ", addr, (uint64_t)length);
context.Dump (strm, instruction);
strm.EOL();
*((uint64_t *) dst) = 0xdeadbeef;
@@ -377,7 +377,7 @@ EmulateInstruction::WriteMemoryDefault (EmulateInstruction *instruction,
size_t length)
{
StreamFile strm (stdout, false);
- strm.Printf (" Write to Memory (address = 0x%llx, length = %zu, context = ", addr, length);
+ strm.Printf (" Write to Memory (address = 0x%llx, length = %llu, context = ", addr, (uint64_t)length);
context.Dump (strm, instruction);
strm.EOL();
return length;
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 15ad72cb7ca..7ef05d9c131 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -99,7 +99,7 @@ namespace lldb {
Mutex::Locker locker (Module::GetAllocationModuleCollectionMutex());
ModuleCollection &modules = GetModuleCollection();
const size_t count = modules.size();
- printf ("%s: %zu modules:\n", __PRETTY_FUNCTION__, count);
+ printf ("%s: %llu modules:\n", __PRETTY_FUNCTION__, (uint64_t)count);
for (size_t i=0; i<count; ++i)
{
diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp
index 54c0d4a9d26..62e4e8a8903 100644
--- a/lldb/source/Expression/ClangFunction.cpp
+++ b/lldb/source/Expression/ClangFunction.cpp
@@ -186,7 +186,7 @@ ClangFunction::CompileFunction (Stream &errors)
char arg_buf[32];
args_buffer.append (" ");
args_buffer.append (type_name);
- snprintf(arg_buf, 31, "arg_%zd", i);
+ snprintf(arg_buf, 31, "arg_%llu", (uint64_t)i);
args_buffer.push_back (' ');
args_buffer.append (arg_buf);
args_buffer.append (";\n");
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index d1b65a5fca4..b044143a9a5 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1345,7 +1345,7 @@ DWARFExpression::Evaluate
for (size_t i=0; i<count; ++i)
{
StreamString new_value;
- new_value.Printf("[%zu]", i);
+ new_value.Printf("[%llu]", (uint64_t)i);
stack[i].Dump(&new_value);
log->Printf(" %s", new_value.GetData());
}
@@ -3186,7 +3186,7 @@ DWARFExpression::Evaluate
for (size_t i=0; i<count; ++i)
{
StreamString new_value;
- new_value.Printf("[%zu]", i);
+ new_value.Printf("[%llu]", (uint64_t)i);
stack[i].Dump(&new_value);
log->Printf(" %s", new_value.GetData());
}
diff --git a/lldb/source/Host/macosx/Host.mm b/lldb/source/Host/macosx/Host.mm
index 9d6a1da4112..8748184693e 100644
--- a/lldb/source/Host/macosx/Host.mm
+++ b/lldb/source/Host/macosx/Host.mm
@@ -1531,7 +1531,7 @@ LaunchProcessPosixSpawn (const char *exe_path, ProcessLaunchInfo &launch_info, :
size_t ocount = 0;
error.SetError( ::posix_spawnattr_setbinpref_np (&attr, 1, &cpu, &ocount), eErrorTypePOSIX);
if (error.Fail() || log)
- error.PutToLog(log.get(), "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %zu )", cpu, ocount);
+ error.PutToLog(log.get(), "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %llu )", cpu, (uint64_t)ocount);
if (error.Fail() || ocount != 1)
return error;
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp
index bb9ed8df07d..1518968bd61 100644
--- a/lldb/source/Interpreter/Args.cpp
+++ b/lldb/source/Interpreter/Args.cpp
@@ -91,15 +91,6 @@ Args::~Args ()
void
Args::Dump (Stream *s)
{
-// int argc = GetArgumentCount();
-//
-// arg_sstr_collection::const_iterator pos, begin = m_args.begin(), end = m_args.end();
-// for (pos = m_args.begin(); pos != end; ++pos)
-// {
-// s->Indent();
-// s->Printf("args[%zu]=%s\n", std::distance(begin, pos), pos->c_str());
-// }
-// s->EOL();
const int argc = m_argv.size();
for (int i=0; i<argc; ++i)
{
diff --git a/lldb/source/Interpreter/OptionValueArray.cpp b/lldb/source/Interpreter/OptionValueArray.cpp
index fbddd7b70a3..1776b83cda5 100644
--- a/lldb/source/Interpreter/OptionValueArray.cpp
+++ b/lldb/source/Interpreter/OptionValueArray.cpp
@@ -126,9 +126,9 @@ OptionValueArray::GetSubValue (const ExecutionContext *exe_ctx,
if (array_count == 0)
error.SetErrorStringWithFormat("index %i is not valid for an empty array", idx);
else if (idx > 0)
- error.SetErrorStringWithFormat("index %i out of range, valid values are 0 through %zu", idx, array_count - 1);
+ error.SetErrorStringWithFormat("index %i out of range, valid values are 0 through %llu", idx, (uint64_t)(array_count - 1));
else
- error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%zu", idx, array_count);
+ error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%llu", idx, (uint64_t)array_count);
}
}
}
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index 0b49f1fc279..506dae07c12 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -145,7 +145,7 @@ CommunicationKDP::SendRequestPacketNoLock (const PacketStreamType &request_packe
return true;
if (log)
- log->Printf ("error: failed to send packet entire packet %zu of %zu bytes sent", bytes_written, packet_size);
+ log->Printf ("error: failed to send packet entire packet %llu of %llu bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size);
}
return false;
}
@@ -189,12 +189,12 @@ 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 = %zu",
+ log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu",
__PRETTY_FUNCTION__,
timeout_usec,
Communication::ConnectionStatusAsCString (status),
error.AsCString(),
- bytes_read);
+ (uint64_t)bytes_read);
if (bytes_read > 0)
{
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 0712ed4e1f7..d1102b7e6ac 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -298,12 +298,12 @@ 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 = %zu",
+ log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu",
__PRETTY_FUNCTION__,
timeout_usec,
Communication::ConnectionStatusAsCString (status),
error.AsCString(),
- bytes_read);
+ (uint64_t)bytes_read);
if (bytes_read > 0)
{
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 8225e69f373..ddb31819b8b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1215,7 +1215,8 @@ 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%zx,%s%s%s", size,
+ const int packet_len = ::snprintf (packet, sizeof(packet), "_M%llx,%s%s%s",
+ (uint64_t)size,
permissions & lldb::ePermissionsReadable ? "r" : "",
permissions & lldb::ePermissionsWritable ? "w" : "",
permissions & lldb::ePermissionsExecutable ? "x" : "");
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index ce9d71b50ec..ee2da0bcf66 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1893,7 +1893,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,%zx", (uint64_t)addr, size);
+ const int packet_len = ::snprintf (packet, sizeof(packet), "m%llx,%llx", (uint64_t)addr, (uint64_t)size);
assert (packet_len + 1 < sizeof(packet));
StringExtractorGDBRemote response;
if (m_gdb_comm.SendPacketAndWaitForResponse(packet, packet_len, response, true))
@@ -1929,7 +1929,7 @@ ProcessGDBRemote::DoWriteMemory (addr_t addr, const void *buf, size_t size, Erro
}
StreamString packet;
- packet.Printf("M%llx,%zx:", addr, size);
+ packet.Printf("M%llx,%llx:", 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))
@@ -1986,7 +1986,7 @@ ProcessGDBRemote::DoAllocateMemory (size_t size, uint32_t permissions, Error &er
}
if (allocated_addr == LLDB_INVALID_ADDRESS)
- error.SetErrorStringWithFormat("unable to allocate %zu bytes of memory with permissions %s", size, GetPermissionsAsCString (permissions));
+ error.SetErrorStringWithFormat("unable to allocate %llu bytes of memory with permissions %s", (uint64_t)size, GetPermissionsAsCString (permissions));
else
error.Clear();
return allocated_addr;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
index ab2f9c4f16e..41a3d865c82 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
@@ -142,7 +142,7 @@ DWARFDebugAranges::Sort (bool minimize)
if (log)
{
orig_arange_size = m_aranges.GetSize();
- log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %zu entries", minimize, orig_arange_size);
+ log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %llu entries", minimize, (uint64_t)orig_arange_size);
}
m_aranges.Sort();
@@ -154,8 +154,10 @@ 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() %zu entries after minimizing (%zu entries combined for %zu bytes saved)",
- new_arange_size, delta, delta * sizeof(Range));
+ log->Printf ("DWARFDebugAranges::Sort() %llu entries after minimizing (%llu entries combined for %llu bytes saved)",
+ (uint64_t)new_arange_size,
+ (uint64_t)delta,
+ (uint64_t)delta * sizeof(Range));
}
Dump (log.get());
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
index 79f36d28ca5..7dfbc64a7ae 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 = %zu)",
- data.GetByteSize());
+ "DWARFDebugPubnames::Extract (byte_size = %llu)",
+ (uint64_t)data.GetByteSize());
LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES));
if (log)
- log->Printf("DWARFDebugPubnames::Extract (byte_size = %zu)", data.GetByteSize());
+ log->Printf("DWARFDebugPubnames::Extract (byte_size = %llu)", (uint64_t)data.GetByteSize());
if (data.ValidOffset(0))
{
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 954f13b87d8..52e262e3c14 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -126,15 +126,15 @@ public:
{
StreamString log_strm;
const size_t n = m_dies.size();
- log_strm.Printf("DIEStack[%zu]:\n", n);
+ log_strm.Printf("DIEStack[%llu]:\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 ("[%zu] 0x%8.8x: %s name='%s'\n",
- i,
+ log_strm.Printf ("[%llu] 0x%8.8x: %s name='%s'\n",
+ (uint64_t)i,
die->GetOffset(),
DW_TAG_value_to_name(die->Tag()),
qualified_name.c_str());
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 1a176471189..7cadcd1a6b4 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -344,10 +344,10 @@ UnwindAssemblyInstEmulation::ReadMemory (EmulateInstruction *instruction,
if (log && log->GetVerbose ())
{
StreamString strm;
- strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory (addr = 0x%16.16llx, dst = %p, dst_len = %zu, context = ",
+ strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory (addr = 0x%16.16llx, dst = %p, dst_len = %llu, context = ",
addr,
dst,
- dst_len);
+ (uint64_t)dst_len);
context.Dump(strm, instruction);
log->PutCString (strm.GetData ());
}
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 13ae29d3dde..9c8e24e404a 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -4497,8 +4497,6 @@ ClangASTContext::GetIndexOfChildMemberWithName
named_decl_pos != path->Decls.second && parent_record_decl;
++named_decl_pos)
{
- //printf ("path[%zu] = %s\n", child_indexes.size(), (*named_decl_pos)->getNameAsCString());
-
child_idx = GetIndexForRecordChild (parent_record_decl, *named_decl_pos, omit_empty_base_classes);
if (child_idx == UINT32_MAX)
{
diff --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp
index 16fcdcafb96..a011bd25d66 100644
--- a/lldb/source/Target/Memory.cpp
+++ b/lldb/source/Target/Memory.cpp
@@ -68,14 +68,11 @@ MemoryCache::Flush (addr_t addr, size_t size)
else
num_cache_lines = (UINT64_MAX - first_cache_line_addr + 1)/cache_line_byte_size;
- //printf ("MemoryCache::Flush (0x%16.16llx, %zu (0x%zx))\n", addr, size, size);
-
uint32_t cache_idx = 0;
for (addr_t curr_addr = first_cache_line_addr;
cache_idx < num_cache_lines;
curr_addr += cache_line_byte_size, ++cache_idx)
{
- //printf ("flushing: 0x%16.16llx\n", curr_addr); /// REMOVE THIS PRIOR TO CHECKIN!!!!
BlockMap::iterator pos = m_cache.find (curr_addr);
if (pos != m_cache.end())
m_cache.erase(pos);
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 88d08cf28a3..4ad52a29677 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -3920,7 +3920,7 @@ Process::GetSTDOUT (char *buf, size_t buf_size, Error &error)
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::GetSTDOUT (buf = %p, size = %zu)", buf, buf_size);
+ log->Printf ("Process::GetSTDOUT (buf = %p, size = %llu)", buf, (uint64_t)buf_size);
if (bytes_available > buf_size)
{
memcpy(buf, m_stdout_data.c_str(), buf_size);
@@ -3946,7 +3946,7 @@ Process::GetSTDERR (char *buf, size_t buf_size, Error &error)
{
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::GetSTDERR (buf = %p, size = %zu)", buf, buf_size);
+ log->Printf ("Process::GetSTDERR (buf = %p, size = %llu)", buf, (uint64_t)buf_size);
if (bytes_available > buf_size)
{
memcpy(buf, m_stderr_data.c_str(), buf_size);
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index ab50e346e88..9fbf08bb890 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -527,8 +527,8 @@ Target::CreateWatchpoint(lldb::addr_t addr, size_t size, uint32_t type, Error &e
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_WATCHPOINTS));
if (log)
- log->Printf("Target::%s (addr = 0x%8.8llx size = %zu type = %u)\n",
- __FUNCTION__, addr, size, type);
+ log->Printf("Target::%s (addr = 0x%8.8llx size = %llu type = %u)\n",
+ __FUNCTION__, addr, (uint64_t)size, type);
WatchpointSP wp_sp;
if (!ProcessIsValid())
@@ -1235,7 +1235,7 @@ Target::ReadMemory (const Address& addr,
if (bytes_read == 0)
error.SetErrorStringWithFormat("read memory from 0x%llx failed", load_addr);
else
- error.SetErrorStringWithFormat("only %zu of %zu bytes were read from memory at 0x%llx", bytes_read, dst_len, load_addr);
+ error.SetErrorStringWithFormat("only %llu of %llu bytes were read from memory at 0x%llx", (uint64_t)bytes_read, (uint64_t)dst_len, load_addr);
}
}
if (bytes_read)
diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index 0420c49014b..8d97c931f98 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -189,7 +189,7 @@ ThreadList::ShouldStop (Event *event_ptr)
if (log)
{
log->PutCString("");
- log->Printf ("ThreadList::%s: %zu threads", __FUNCTION__, m_threads.size());
+ log->Printf ("ThreadList::%s: %llu threads", __FUNCTION__, (uint64_t)m_threads.size());
}
for (pos = m_threads.begin(); pos != end; ++pos)
@@ -228,7 +228,7 @@ ThreadList::ShouldReportStop (Event *event_ptr)
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
- log->Printf ("ThreadList::%s %zu threads", __FUNCTION__, m_threads.size());
+ log->Printf ("ThreadList::%s %llu threads", __FUNCTION__, (uint64_t)m_threads.size());
// Run through the threads and ask whether we should report this event.
// For stopping, a YES vote wins over everything. A NO vote wins over NO opinion.
OpenPOWER on IntegriCloud