Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
This commit is contained in:
parent
05d3bf77a1
commit
d01b2953fa
149 changed files with 686 additions and 679 deletions
|
|
@ -133,7 +133,7 @@ SBAddress::GetLoadAddress (const SBTarget &target) const
|
|||
if (addr == LLDB_INVALID_ADDRESS)
|
||||
log->Printf ("SBAddress::GetLoadAddress (SBTarget(%p)) => LLDB_INVALID_ADDRESS", target_sp.get());
|
||||
else
|
||||
log->Printf ("SBAddress::GetLoadAddress (SBTarget(%p)) => 0x%llx", target_sp.get(), addr);
|
||||
log->Printf ("SBAddress::GetLoadAddress (SBTarget(%p)) => 0x%" PRIx64, target_sp.get(), addr);
|
||||
}
|
||||
|
||||
return addr;
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ SBBlock::GetDescription (SBStream &description)
|
|||
if (m_opaque_ptr)
|
||||
{
|
||||
lldb::user_id_t id = m_opaque_ptr->GetID();
|
||||
strm.Printf ("Block: {id: %llu} ", id);
|
||||
strm.Printf ("Block: {id: %" PRIu64 "} ", id);
|
||||
if (IsInlined())
|
||||
{
|
||||
strm.Printf (" (inlined, '%s') ", GetInlinedName());
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ SBBreakpoint::SetThreadID (tid_t tid)
|
|||
}
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4llx)", m_opaque_sp.get(), tid);
|
||||
log->Printf ("SBBreakpoint(%p)::SetThreadID (tid=0x%4.4" PRIx64 ")", m_opaque_sp.get(), tid);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ SBBreakpoint::GetThreadID ()
|
|||
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4llx", m_opaque_sp.get(), tid);
|
||||
log->Printf ("SBBreakpoint(%p)::GetThreadID () => 0x%4.4" PRIx64, m_opaque_sp.get(), tid);
|
||||
return tid;
|
||||
}
|
||||
|
||||
|
|
@ -479,7 +479,7 @@ SBBreakpoint::GetNumResolvedLocations() const
|
|||
}
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_resolved);
|
||||
log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_resolved);
|
||||
return num_resolved;
|
||||
}
|
||||
|
||||
|
|
@ -494,7 +494,7 @@ SBBreakpoint::GetNumLocations() const
|
|||
}
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_locs);
|
||||
log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %" PRIu64, m_opaque_sp.get(), (uint64_t)num_locs);
|
||||
return num_locs;
|
||||
}
|
||||
|
||||
|
|
@ -508,7 +508,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 = %llu", (uint64_t)num_locations);
|
||||
s.Printf(", locations = %" PRIu64, (uint64_t)num_locations);
|
||||
return true;
|
||||
}
|
||||
s.Printf ("No value");
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ SBCommandInterpreter::HandleCompletion (const char *current_line,
|
|||
return 0;
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBCommandInterpreter(%p)::HandleCompletion (current_line=\"%s\", cursor at: %lld, last char at: %lld, match_start_point: %d, max_return_elements: %d)",
|
||||
log->Printf ("SBCommandInterpreter(%p)::HandleCompletion (current_line=\"%s\", cursor at: %" PRId64 ", last char at: %" PRId64 ", match_start_point: %d, max_return_elements: %d)",
|
||||
m_opaque_ptr, current_line, (uint64_t) (cursor - current_line), (uint64_t) (last_char - current_line), match_start_point, max_return_elements);
|
||||
|
||||
if (m_opaque_ptr)
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ 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=%llu, timeout_usec=%u, &status)...",
|
||||
log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%" PRIu64 ", timeout_usec=%u, &status)...",
|
||||
m_opaque,
|
||||
dst,
|
||||
(uint64_t)dst_len,
|
||||
|
|
@ -151,7 +151,7 @@ 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=%llu, timeout_usec=%u, &status=%s) => %llu",
|
||||
log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%" PRIu64 ", timeout_usec=%u, &status=%s) => %" PRIu64,
|
||||
m_opaque,
|
||||
dst,
|
||||
(uint64_t)dst_len,
|
||||
|
|
@ -173,7 +173,7 @@ 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=%llu, &status=%s) => %llu",
|
||||
log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%" PRIu64 ", &status=%s) => %" PRIu64,
|
||||
m_opaque, src, (uint64_t)src_len, Communication::ConnectionStatusAsCString (status), (uint64_t)bytes_written);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ SBData::GetUnsignedInt64 (lldb::SBError& error, uint32_t offset)
|
|||
}
|
||||
if (log)
|
||||
log->Printf ("SBData::GetUnsignedInt64 (error=%p,offset=%d) => "
|
||||
"(%lld)", error.get(), offset, value);
|
||||
"(%" PRId64 ")", error.get(), offset, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ SBData::GetSignedInt64 (lldb::SBError& error, uint32_t offset)
|
|||
}
|
||||
if (log)
|
||||
log->Printf ("SBData::GetSignedInt64 (error=%p,offset=%d) => "
|
||||
"(%lld)", error.get(), offset, value);
|
||||
"(%" PRId64 ")", error.get(), offset, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ 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=%llu)",
|
||||
log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%" PRIu64 ")",
|
||||
m_opaque_sp.get(),
|
||||
(int) data_len,
|
||||
(const char *) data,
|
||||
|
|
@ -1049,7 +1049,7 @@ SBDebugger::GetDescription (SBStream &description)
|
|||
{
|
||||
const char *name = m_opaque_sp->GetInstanceName().AsCString();
|
||||
user_id_t id = m_opaque_sp->GetID();
|
||||
strm.Printf ("Debugger (instance: \"%s\", id: %llu)", name, id);
|
||||
strm.Printf ("Debugger (instance: \"%s\", id: %" PRIu64 ")", name, id);
|
||||
}
|
||||
else
|
||||
strm.PutCString ("No value");
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ 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=%llu) => %u",
|
||||
log->Printf ("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%" PRIu64 ") => %u",
|
||||
m_opaque_ap.get(), result, dst_path, (uint64_t)dst_len, result);
|
||||
|
||||
if (result == 0 && dst_path && dst_len > 0)
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ SBFrame::GetPC () const
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBFrame(%p)::GetPC () => 0x%llx", frame, addr);
|
||||
log->Printf ("SBFrame(%p)::GetPC () => 0x%" PRIx64, frame, addr);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
|
@ -518,7 +518,7 @@ SBFrame::SetPC (addr_t new_pc)
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBFrame(%p)::SetPC (new_pc=0x%llx) => %i",
|
||||
log->Printf ("SBFrame(%p)::SetPC (new_pc=0x%" PRIx64 ") => %i",
|
||||
frame, new_pc, ret_val);
|
||||
|
||||
return ret_val;
|
||||
|
|
@ -558,7 +558,7 @@ SBFrame::GetSP () const
|
|||
}
|
||||
}
|
||||
if (log)
|
||||
log->Printf ("SBFrame(%p)::GetSP () => 0x%llx", frame, addr);
|
||||
log->Printf ("SBFrame(%p)::GetSP () => 0x%" PRIx64, frame, addr);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
|
@ -599,7 +599,7 @@ SBFrame::GetFP () const
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBFrame(%p)::GetFP () => 0x%llx", frame, addr);
|
||||
log->Printf ("SBFrame(%p)::GetFP () => 0x%" PRIx64, frame, addr);
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ SBFunction::GetDescription (SBStream &s)
|
|||
{
|
||||
if (m_opaque_ptr)
|
||||
{
|
||||
s.Printf ("SBFunction: id = 0x%8.8llx, name = %s",
|
||||
s.Printf ("SBFunction: id = 0x%8.8" PRIx64 ", name = %s",
|
||||
m_opaque_ptr->GetID(),
|
||||
m_opaque_ptr->GetName().AsCString());
|
||||
Type *func_type = m_opaque_ptr->GetType();
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ SBProcess::RemoteAttachToProcessWithID (lldb::pid_t pid, lldb::SBError& error)
|
|||
if (log) {
|
||||
SBStream sstr;
|
||||
error.GetDescription (sstr);
|
||||
log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%llu) => SBError (%p): %s", process_sp.get(), pid, error.get(), sstr.GetData());
|
||||
log->Printf ("SBProcess(%p)::RemoteAttachToProcessWithID (%" PRIu64 ") => SBError (%p): %s", process_sp.get(), pid, error.get(), sstr.GetData());
|
||||
}
|
||||
|
||||
return error.Success();
|
||||
|
|
@ -333,7 +333,7 @@ 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=%llu) => %llu",
|
||||
log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
|
||||
process_sp.get(),
|
||||
(int) bytes_read,
|
||||
dst,
|
||||
|
|
@ -356,7 +356,7 @@ 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=%llu) => %llu",
|
||||
log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
|
||||
process_sp.get(),
|
||||
(int) bytes_read,
|
||||
dst,
|
||||
|
|
@ -379,7 +379,7 @@ SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const
|
|||
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBProcess(%p)::GetProfileData (dst=\"%.*s\", dst_len=%llu) => %llu",
|
||||
log->Printf ("SBProcess(%p)::GetProfileData (dst=\"%.*s\", dst_len=%" PRIu64 ") => %" PRIu64,
|
||||
process_sp.get(),
|
||||
(int) bytes_read,
|
||||
dst,
|
||||
|
|
@ -402,7 +402,7 @@ SBProcess::ReportEventState (const SBEvent &event, FILE *out) const
|
|||
char message[1024];
|
||||
int message_len = ::snprintf (message,
|
||||
sizeof (message),
|
||||
"Process %llu %s\n",
|
||||
"Process %" PRIu64 " %s\n",
|
||||
process_sp->GetID(),
|
||||
SBDebugger::StateAsCString (event_state));
|
||||
|
||||
|
|
@ -421,7 +421,7 @@ SBProcess::AppendEventStateReport (const SBEvent &event, SBCommandReturnObject &
|
|||
char message[1024];
|
||||
::snprintf (message,
|
||||
sizeof (message),
|
||||
"Process %llu %s\n",
|
||||
"Process %" PRIu64 " %s\n",
|
||||
process_sp->GetID(),
|
||||
SBDebugger::StateAsCString (event_state));
|
||||
|
||||
|
|
@ -455,7 +455,7 @@ SBProcess::SetSelectedThreadByID (lldb::tid_t tid)
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBProcess(%p)::SetSelectedThreadByID (tid=0x%4.4llx) => %s",
|
||||
log->Printf ("SBProcess(%p)::SetSelectedThreadByID (tid=0x%4.4" PRIx64 ") => %s",
|
||||
process_sp.get(), tid, (ret_val ? "true" : "false"));
|
||||
|
||||
return ret_val;
|
||||
|
|
@ -574,7 +574,7 @@ SBProcess::GetProcessID ()
|
|||
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBProcess(%p)::GetProcessID () => %llu", process_sp.get(), ret_val);
|
||||
log->Printf ("SBProcess(%p)::GetProcessID () => %" PRIu64, process_sp.get(), ret_val);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
|
@ -802,7 +802,7 @@ SBProcess::GetThreadByID (tid_t tid)
|
|||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4llx) => SBThread (%p)",
|
||||
log->Printf ("SBProcess(%p)::GetThreadByID (tid=0x%4.4" PRIx64 ") => SBThread (%p)",
|
||||
process_sp.get(),
|
||||
tid,
|
||||
thread_sp.get());
|
||||
|
|
@ -904,7 +904,7 @@ 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=%llu, SBError (%p))...",
|
||||
log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%" PRIx64 ", dst=%p, dst_len=%" PRIu64 ", SBError (%p))...",
|
||||
process_sp.get(),
|
||||
addr,
|
||||
dst,
|
||||
|
|
@ -936,7 +936,7 @@ 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=%llu, SBError (%p): %s) => %llu",
|
||||
log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%" PRIx64 ", dst=%p, dst_len=%" PRIu64 ", SBError (%p): %s) => %" PRIu64,
|
||||
process_sp.get(),
|
||||
addr,
|
||||
dst,
|
||||
|
|
@ -1044,7 +1044,7 @@ 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, src_len=%llu, SBError (%p))...",
|
||||
log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%" PRIx64 ", src=%p, src_len=%" PRIu64 ", SBError (%p))...",
|
||||
process_sp.get(),
|
||||
addr,
|
||||
src,
|
||||
|
|
@ -1072,7 +1072,7 @@ 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, src_len=%llu, SBError (%p): %s) => %llu",
|
||||
log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%" PRIx64 ", src=%p, src_len=%" PRIu64 ", SBError (%p): %s) => %" PRIu64,
|
||||
process_sp.get(),
|
||||
addr,
|
||||
src,
|
||||
|
|
@ -1100,7 +1100,7 @@ SBProcess::GetDescription (SBStream &description)
|
|||
if (exe_module)
|
||||
exe_name = exe_module->GetFileSpec().GetFilename().AsCString();
|
||||
|
||||
strm.Printf ("SBProcess: pid = %llu, state = %s, threads = %d%s%s",
|
||||
strm.Printf ("SBProcess: pid = %" PRIu64 ", state = %s, threads = %d%s%s",
|
||||
process_sp->GetID(),
|
||||
lldb_private::StateAsCString (GetState()),
|
||||
GetNumThreads(),
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ SBSection::GetDescription (SBStream &description)
|
|||
if (section_sp)
|
||||
{
|
||||
const addr_t file_addr = section_sp->GetFileAddress();
|
||||
strm.Printf ("[0x%16.16llx-0x%16.16llx) ", file_addr, file_addr + section_sp->GetByteSize());
|
||||
strm.Printf ("[0x%16.16" PRIx64 "-0x%16.16" PRIx64 ") ", file_addr, file_addr + section_sp->GetByteSize());
|
||||
section_sp->DumpName(&strm);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ SBTarget::Attach (SBAttachInfo &sb_attach_info, SBError& error)
|
|||
}
|
||||
else
|
||||
{
|
||||
error.ref().SetErrorStringWithFormat("no process found with process ID %llu", attach_pid);
|
||||
error.ref().SetErrorStringWithFormat("no process found with process ID %" PRIu64, attach_pid);
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::Attach (...) => error %s",
|
||||
|
|
@ -944,7 +944,7 @@ SBTarget::AttachToProcessWithID
|
|||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::AttachToProcessWithID (listener, pid=%lld, error)...", target_sp.get(), pid);
|
||||
log->Printf ("SBTarget(%p)::AttachToProcessWithID (listener, pid=%" PRId64 ", error)...", target_sp.get(), pid);
|
||||
}
|
||||
|
||||
if (target_sp)
|
||||
|
|
@ -1487,7 +1487,7 @@ SBTarget::BreakpointCreateByAddress (addr_t address)
|
|||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (address=%llu) => SBBreakpoint(%p)", target_sp.get(), (uint64_t) address, sb_bp.get());
|
||||
log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (address=%" PRIu64 ") => SBBreakpoint(%p)", target_sp.get(), (uint64_t) address, sb_bp.get());
|
||||
}
|
||||
|
||||
return sb_bp;
|
||||
|
|
@ -1792,7 +1792,7 @@ SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, S
|
|||
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("SBTarget(%p)::WatchAddress (addr=0x%llx, 0x%u) => SBWatchpoint(%p)",
|
||||
log->Printf ("SBTarget(%p)::WatchAddress (addr=0x%" PRIx64 ", 0x%u) => SBWatchpoint(%p)",
|
||||
target_sp.get(), addr, (uint32_t) size, watchpoint_sp.get());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -715,7 +715,7 @@ SBThread::RunToAddress (lldb::addr_t addr)
|
|||
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBThread(%p)::RunToAddress (addr=0x%llx)", exe_ctx.GetThreadPtr(), addr);
|
||||
log->Printf ("SBThread(%p)::RunToAddress (addr=0x%" PRIx64 ")", exe_ctx.GetThreadPtr(), addr);
|
||||
|
||||
if (exe_ctx.HasThreadScope())
|
||||
{
|
||||
|
|
@ -1185,7 +1185,7 @@ SBThread::GetDescription (SBStream &description) const
|
|||
ExecutionContext exe_ctx (m_opaque_sp.get());
|
||||
if (exe_ctx.HasThreadScope())
|
||||
{
|
||||
strm.Printf("SBThread: tid = 0x%4.4llx", exe_ctx.GetThreadPtr()->GetID());
|
||||
strm.Printf("SBThread: tid = 0x%4.4" PRIx64, exe_ctx.GetThreadPtr()->GetID());
|
||||
}
|
||||
else
|
||||
strm.PutCString ("No value");
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ SBValue::GetByteSize ()
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("SBValue(%p)::GetByteSize () => %llu", value_sp.get(), (uint64_t)result);
|
||||
log->Printf ("SBValue(%p)::GetByteSize () => %" PRIu64, value_sp.get(), (uint64_t)result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -1755,7 +1755,7 @@ SBValue::GetLoadAddress()
|
|||
}
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBValue(%p)::GetLoadAddress () => (%llu)", value_sp.get(), value);
|
||||
log->Printf ("SBValue(%p)::GetLoadAddress () => (%" PRIu64 ")", value_sp.get(), value);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
@ -1792,7 +1792,7 @@ SBValue::GetAddress()
|
|||
}
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
if (log)
|
||||
log->Printf ("SBValue(%p)::GetAddress () => (%s,%llu)", value_sp.get(),
|
||||
log->Printf ("SBValue(%p)::GetAddress () => (%s,%" PRIu64 ")", value_sp.get(),
|
||||
(addr.GetSection() ? addr.GetSection()->GetName().GetCString() : "NULL"),
|
||||
addr.GetOffset());
|
||||
return SBAddress(new Address(addr));
|
||||
|
|
|
|||
|
|
@ -545,9 +545,9 @@ Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_l
|
|||
case lldb::eDescriptionLevelFull:
|
||||
if (num_locations > 0)
|
||||
{
|
||||
s->Printf(", locations = %llu", (uint64_t)num_locations);
|
||||
s->Printf(", locations = %" PRIu64, (uint64_t)num_locations);
|
||||
if (num_resolved_locations > 0)
|
||||
s->Printf(", resolved = %llu", (uint64_t)num_resolved_locations);
|
||||
s->Printf(", resolved = %" PRIu64, (uint64_t)num_resolved_locations);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ BreakpointLocation::ResolveBreakpointSite ()
|
|||
{
|
||||
LogSP log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
|
||||
if (log)
|
||||
log->Warning ("Tried to add breakpoint site at 0x%llx but it was already present.\n",
|
||||
log->Warning ("Tried to add breakpoint site at 0x%" PRIx64 " but it was already present.\n",
|
||||
m_address.GetOpcodeLoadAddress (&m_owner.GetTarget()));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -537,7 +537,7 @@ BreakpointLocation::Dump(Stream *s) const
|
|||
if (s == NULL)
|
||||
return;
|
||||
|
||||
s->Printf("BreakpointLocation %u: tid = %4.4llx load addr = 0x%8.8llx state = %s type = %s breakpoint "
|
||||
s->Printf("BreakpointLocation %u: tid = %4.4" PRIx64 " load addr = 0x%8.8" PRIx64 " state = %s type = %s breakpoint "
|
||||
"hw_index = %i hit_count = %-4u ignore_count = %-4u",
|
||||
GetID(),
|
||||
GetOptionsNoCreate()->GetThreadSpecNoCreate()->GetTID(),
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ BreakpointLocationList::Dump (Stream *s) const
|
|||
s->Printf("%p: ", this);
|
||||
//s->Indent();
|
||||
Mutex::Locker locker (m_mutex);
|
||||
s->Printf("BreakpointLocationList with %llu BreakpointLocations:\n", (uint64_t)m_locations.size());
|
||||
s->Printf("BreakpointLocationList with %" PRIu64 " 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)
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ BreakpointResolverFileLine::SearchCallback
|
|||
}
|
||||
else if (log)
|
||||
{
|
||||
log->Printf ("Breakpoint at file address 0x%llx for %s:%d didn't pass the filter.\n",
|
||||
log->Printf ("Breakpoint at file address 0x%" PRIx64 " for %s:%d didn't pass the filter.\n",
|
||||
line_start.GetFileAddress(),
|
||||
m_file_spec.GetFilename().AsCString("<Unknown>"),
|
||||
m_line_number);
|
||||
|
|
@ -183,7 +183,7 @@ BreakpointResolverFileLine::SearchCallback
|
|||
else
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("error: Unable to set breakpoint at file address 0x%llx for %s:%d\n",
|
||||
log->Printf ("error: Unable to set breakpoint at file address 0x%" PRIx64 " for %s:%d\n",
|
||||
line_start.GetFileAddress(),
|
||||
m_file_spec.GetFilename().AsCString("<Unknown>"),
|
||||
m_line_number);
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ BreakpointResolverFileRegex::SearchCallback
|
|||
}
|
||||
else if (log)
|
||||
{
|
||||
log->Printf ("Breakpoint at file address 0x%llx for %s:%d didn't pass filter.\n",
|
||||
log->Printf ("Breakpoint at file address 0x%" PRIx64 " for %s:%d didn't pass filter.\n",
|
||||
line_start.GetFileAddress(),
|
||||
cu_file_spec.GetFilename().AsCString("<Unknown>"),
|
||||
line_matches[i]);
|
||||
|
|
@ -101,7 +101,7 @@ BreakpointResolverFileRegex::SearchCallback
|
|||
else
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("error: Unable to set breakpoint at file address 0x%llx for %s:%d\n",
|
||||
log->Printf ("error: Unable to set breakpoint at file address 0x%" PRIx64 " for %s:%d\n",
|
||||
line_start.GetFileAddress(),
|
||||
cu_file_spec.GetFilename().AsCString("<Unknown>"),
|
||||
line_matches[i]);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ BreakpointSite::Dump(Stream *s) const
|
|||
if (s == NULL)
|
||||
return;
|
||||
|
||||
s->Printf("BreakpointSite %u: addr = 0x%8.8llx type = %s breakpoint hw_index = %i hit_count = %-4u",
|
||||
s->Printf("BreakpointSite %u: addr = 0x%8.8" PRIx64 " type = %s breakpoint hw_index = %i hit_count = %-4u",
|
||||
GetID(),
|
||||
(uint64_t)m_addr,
|
||||
IsHardware() ? "hardware" : "software",
|
||||
|
|
@ -95,7 +95,7 @@ void
|
|||
BreakpointSite::GetDescription (Stream *s, lldb::DescriptionLevel level)
|
||||
{
|
||||
if (level != lldb::eDescriptionLevelBrief)
|
||||
s->Printf ("breakpoint site: %d at 0x%8.8llx", GetID(), GetLoadAddress());
|
||||
s->Printf ("breakpoint site: %d at 0x%8.8" PRIx64, GetID(), GetLoadAddress());
|
||||
m_owners.GetDescription (s, level);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ BreakpointSiteList::FindIDByAddress (lldb::addr_t addr)
|
|||
BreakpointSiteSP bp = FindByAddress (addr);
|
||||
if (bp)
|
||||
{
|
||||
//DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8llx ) => %u", __FUNCTION__, (uint64_t)addr, bp->GetID());
|
||||
//DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8" PRIx64 " ) => %u", __FUNCTION__, (uint64_t)addr, bp->GetID());
|
||||
return bp.get()->GetID();
|
||||
}
|
||||
//DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8llx ) => NONE", __FUNCTION__, (uint64_t)addr);
|
||||
//DBLogIf(PD_LOG_BREAKPOINTS, "BreakpointSiteList::%s ( addr = 0x%8.8" PRIx64 " ) => NONE", __FUNCTION__, (uint64_t)addr);
|
||||
return LLDB_INVALID_BREAK_ID;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ Watchpoint::DumpWithLevel(Stream *s, lldb::DescriptionLevel description_level) c
|
|||
assert(description_level >= lldb::eDescriptionLevelBrief &&
|
||||
description_level <= lldb::eDescriptionLevelVerbose);
|
||||
|
||||
s->Printf("Watchpoint %u: addr = 0x%8.8llx size = %u state = %s type = %s%s",
|
||||
s->Printf("Watchpoint %u: addr = 0x%8.8" PRIx64 " size = %u state = %s type = %s%s",
|
||||
GetID(),
|
||||
GetLoadAddress(),
|
||||
m_byte_size,
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ WatchpointList::DumpWithLevel (Stream *s, lldb::DescriptionLevel description_lev
|
|||
Mutex::Locker locker (m_mutex);
|
||||
s->Printf("%p: ", this);
|
||||
//s->Indent();
|
||||
s->Printf("WatchpointList with %llu Watchpoints:\n",
|
||||
s->Printf("WatchpointList with %" PRIu64 " Watchpoints:\n",
|
||||
(uint64_t)m_watchpoints.size());
|
||||
s->IndentMore();
|
||||
wp_collection::const_iterator pos, end = m_watchpoints.end();
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ CommandObjectDisassemble::DoExecute (Args& command, CommandReturnObject &result)
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8llx.\n", m_options.start_addr);
|
||||
result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8" PRIx64 ".\n", m_options.start_addr);
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
|
|
@ -470,7 +470,7 @@ CommandObjectDisassemble::DoExecute (Args& command, CommandReturnObject &result)
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8llx.\n", m_options.start_addr);
|
||||
result.AppendErrorWithFormat ("Failed to disassemble memory at 0x%8.8" PRIx64 ".\n", m_options.start_addr);
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ public:
|
|||
if (byte_size_option_set)
|
||||
{
|
||||
if (byte_size_value > 1)
|
||||
error.SetErrorStringWithFormat ("display format (bytes/bytes with ascii) conflicts with the specified byte size %llu\n"
|
||||
error.SetErrorStringWithFormat ("display format (bytes/bytes with ascii) conflicts with the specified byte size %" PRIu64 "\n"
|
||||
"\tconsider using a different display format or don't specify the byte size",
|
||||
byte_size_value.GetCurrentValue());
|
||||
}
|
||||
|
|
@ -620,13 +620,13 @@ protected:
|
|||
}
|
||||
else if (end_addr <= addr)
|
||||
{
|
||||
result.AppendErrorWithFormat("end address (0x%llx) must be greater that the start address (0x%llx).\n", end_addr, addr);
|
||||
result.AppendErrorWithFormat("end address (0x%" PRIx64 ") must be greater that the start address (0x%" PRIx64 ").\n", end_addr, addr);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
else if (m_format_options.GetCountValue().OptionWasSet())
|
||||
{
|
||||
result.AppendErrorWithFormat("specify either the end address (0x%llx) or the count (--count %lu), not both.\n", end_addr, item_count);
|
||||
result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %lu), not both.\n", end_addr, item_count);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -658,14 +658,14 @@ protected:
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat("failed to read memory from 0x%llx.\n", addr);
|
||||
result.AppendErrorWithFormat("failed to read memory from 0x%" PRIx64 ".\n", addr);
|
||||
}
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bytes_read < total_byte_size)
|
||||
result.AppendWarningWithFormat("Not all bytes (%lu/%lu) 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%" PRIx64 ".\n", bytes_read, total_byte_size, addr);
|
||||
else
|
||||
{
|
||||
m_next_addr = addr + bytes_read;
|
||||
|
|
@ -705,7 +705,7 @@ protected:
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat("Failed to write %llu bytes to '%s'.\n", (uint64_t)bytes_read, path);
|
||||
result.AppendErrorWithFormat("Failed to write %" PRIu64 " bytes to '%s'.\n", (uint64_t)bytes_read, path);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -738,7 +738,7 @@ protected:
|
|||
addr_t item_addr = addr + (i * item_byte_size);
|
||||
Address address (item_addr);
|
||||
StreamString name_strm;
|
||||
name_strm.Printf ("0x%llx", item_addr);
|
||||
name_strm.Printf ("0x%" PRIx64, item_addr);
|
||||
ValueObjectSP valobj_sp (ValueObjectMemory::Create (exe_scope,
|
||||
name_strm.GetString().c_str(),
|
||||
address,
|
||||
|
|
@ -1044,18 +1044,18 @@ protected:
|
|||
if (bytes_written == length)
|
||||
{
|
||||
// All bytes written
|
||||
result.GetOutputStream().Printf("%llu bytes were written to 0x%llx\n", (uint64_t)bytes_written, addr);
|
||||
result.GetOutputStream().Printf("%" PRIu64 " bytes were written to 0x%" PRIx64 "\n", (uint64_t)bytes_written, addr);
|
||||
result.SetStatus(eReturnStatusSuccessFinishResult);
|
||||
}
|
||||
else if (bytes_written > 0)
|
||||
{
|
||||
// Some byte written
|
||||
result.GetOutputStream().Printf("%llu bytes of %llu requested were written to 0x%llx\n", (uint64_t)bytes_written, (uint64_t)length, addr);
|
||||
result.GetOutputStream().Printf("%" PRIu64 " bytes of %" PRIu64 " requested were written to 0x%" PRIx64 "\n", (uint64_t)bytes_written, (uint64_t)length, addr);
|
||||
result.SetStatus(eReturnStatusSuccessFinishResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat ("Memory write to 0x%llx failed: %s.\n", addr, error.AsCString());
|
||||
result.AppendErrorWithFormat ("Memory write to 0x%" PRIx64 " failed: %s.\n", addr, error.AsCString());
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
|
|
@ -1133,7 +1133,7 @@ protected:
|
|||
}
|
||||
else if (!UIntValueIsValidForSize (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.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1161,7 +1161,7 @@ protected:
|
|||
}
|
||||
else if (!UIntValueIsValidForSize (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.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1184,7 +1184,7 @@ protected:
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat ("Memory write to 0x%llx failed: %s.\n", addr, error.AsCString());
|
||||
result.AppendErrorWithFormat ("Memory write to 0x%" PRIx64 " failed: %s.\n", addr, error.AsCString());
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1201,7 +1201,7 @@ protected:
|
|||
}
|
||||
else if (!SIntValueIsValidForSize (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.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %lu byte signed integer value.\n", sval64, item_byte_size);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1218,7 +1218,7 @@ protected:
|
|||
}
|
||||
else if (!UIntValueIsValidForSize (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.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1235,7 +1235,7 @@ protected:
|
|||
}
|
||||
else if (!UIntValueIsValidForSize (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.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1251,7 +1251,7 @@ protected:
|
|||
return true;
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat ("Memory write to 0x%llx failed: %s.\n", addr, error.AsCString());
|
||||
result.AppendErrorWithFormat ("Memory write to 0x%" PRIx64 " failed: %s.\n", addr, error.AsCString());
|
||||
result.SetStatus(eReturnStatusFailed);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ protected:
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat ("no process found with pid = %llu\n", pid);
|
||||
result.AppendErrorWithFormat ("no process found with pid = %" PRIu64 "\n", pid);
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
|
|
@ -796,12 +796,12 @@ protected:
|
|||
ProcessInstanceInfo proc_info;
|
||||
if (platform_sp->GetProcessInfo (pid, proc_info))
|
||||
{
|
||||
ostrm.Printf ("Process information for process %llu:\n", pid);
|
||||
ostrm.Printf ("Process information for process %" PRIu64 ":\n", pid);
|
||||
proc_info.Dump (ostrm, platform_sp.get());
|
||||
}
|
||||
else
|
||||
{
|
||||
ostrm.Printf ("error: no process information is available for process %llu\n", pid);
|
||||
ostrm.Printf ("error: no process information is available for process %" PRIu64 "\n", pid);
|
||||
}
|
||||
ostrm.EOL();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ protected:
|
|||
{
|
||||
const char *archname = exe_module->GetArchitecture().GetArchitectureName();
|
||||
|
||||
result.AppendMessageWithFormat ("Process %llu launched: '%s' (%s)\n", process->GetID(), filename, archname);
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " launched: '%s' (%s)\n", process->GetID(), filename, archname);
|
||||
result.SetDidChangeProcessState (true);
|
||||
if (m_options.launch_info.GetFlags().Test(eLaunchFlagStopAtEntry) == false)
|
||||
{
|
||||
|
|
@ -510,7 +510,7 @@ protected:
|
|||
state = process->GetState();
|
||||
if (process->IsAlive() && state != eStateConnected)
|
||||
{
|
||||
result.AppendErrorWithFormat ("Process %llu is currently being debugged, kill the process before attaching.\n",
|
||||
result.AppendErrorWithFormat ("Process %" PRIu64 " is currently being debugged, kill the process before attaching.\n",
|
||||
process->GetID());
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
return false;
|
||||
|
|
@ -597,7 +597,7 @@ protected:
|
|||
|
||||
if (state == eStateStopped)
|
||||
{
|
||||
result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
|
||||
result.SetStatus (eReturnStatusSuccessFinishNoResult);
|
||||
}
|
||||
else
|
||||
|
|
@ -815,13 +815,13 @@ protected:
|
|||
Error error(process->Resume());
|
||||
if (error.Success())
|
||||
{
|
||||
result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID());
|
||||
if (synchronous_execution)
|
||||
{
|
||||
state = process->WaitForProcessToStop (NULL);
|
||||
|
||||
result.SetDidChangeProcessState (true);
|
||||
result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
|
||||
result.SetStatus (eReturnStatusSuccessFinishNoResult);
|
||||
}
|
||||
else
|
||||
|
|
@ -897,7 +897,7 @@ protected:
|
|||
return false;
|
||||
}
|
||||
|
||||
result.AppendMessageWithFormat ("Detaching from process %llu\n", process->GetID());
|
||||
result.AppendMessageWithFormat ("Detaching from process %" PRIu64 "\n", process->GetID());
|
||||
Error error (process->Detach());
|
||||
if (error.Success())
|
||||
{
|
||||
|
|
@ -1011,7 +1011,7 @@ protected:
|
|||
{
|
||||
if (process->IsAlive())
|
||||
{
|
||||
result.AppendErrorWithFormat ("Process %llu is currently being debugged, kill the process before connecting.\n",
|
||||
result.AppendErrorWithFormat ("Process %" PRIu64 " is currently being debugged, kill the process before connecting.\n",
|
||||
process->GetID());
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ DumpTargetInfo (uint32_t target_idx, Target *target, const char *prefix_cstr, bo
|
|||
show_process_status = StateIsStoppedState(state, true);
|
||||
const char *state_cstr = StateAsCString (state);
|
||||
if (pid != LLDB_INVALID_PROCESS_ID)
|
||||
strm.Printf ("%spid=%llu", properties++ > 0 ? ", " : " ( ", pid);
|
||||
strm.Printf ("%spid=%" PRIu64, properties++ > 0 ? ", " : " ( ", pid);
|
||||
strm.Printf ("%sstate=%s", properties++ > 0 ? ", " : " ( ", state_cstr);
|
||||
}
|
||||
if (properties > 0)
|
||||
|
|
@ -2664,7 +2664,7 @@ protected:
|
|||
{
|
||||
if (target->GetSectionLoadList().SetSectionLoadAddress (section_sp, load_addr))
|
||||
changed = true;
|
||||
result.AppendMessageWithFormat("section '%s' loaded at 0x%llx\n", sect_name, load_addr);
|
||||
result.AppendMessageWithFormat("section '%s' loaded at 0x%" PRIx64 "\n", sect_name, load_addr);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -2918,13 +2918,13 @@ protected:
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendError ("Couldn't find module matching address: 0x%llx.", m_options.m_module_addr);
|
||||
result.AppendError ("Couldn't find module matching address: 0x%" PRIx64 ".", m_options.m_module_addr);
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.AppendError ("Couldn't find module containing address: 0x%llx.", m_options.m_module_addr);
|
||||
result.AppendError ("Couldn't find module containing address: 0x%" PRIx64 ".", m_options.m_module_addr);
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
|
|
@ -3102,12 +3102,12 @@ protected:
|
|||
if (format_char == 'o')
|
||||
{
|
||||
// Show the offset of slide for the image
|
||||
strm.Printf ("0x%*.*llx", addr_nibble_width, addr_nibble_width, header_load_addr - header_addr.GetFileAddress());
|
||||
strm.Printf ("0x%*.*" PRIx64, addr_nibble_width, addr_nibble_width, header_load_addr - header_addr.GetFileAddress());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show the load address of the image
|
||||
strm.Printf ("0x%*.*llx", addr_nibble_width, addr_nibble_width, header_load_addr);
|
||||
strm.Printf ("0x%*.*" PRIx64, addr_nibble_width, addr_nibble_width, header_load_addr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -3399,14 +3399,14 @@ protected:
|
|||
Address first_non_prologue_insn (func_unwinders_sp->GetFirstNonPrologueInsn(*target));
|
||||
if (first_non_prologue_insn.IsValid())
|
||||
{
|
||||
result.GetOutputStream().Printf("First non-prologue instruction is at address 0x%llx or offset %lld into the function.\n", first_non_prologue_insn.GetLoadAddress(target), first_non_prologue_insn.GetLoadAddress(target) - start_addr);
|
||||
result.GetOutputStream().Printf("First non-prologue instruction is at address 0x%" PRIx64 " or offset %" PRId64 " into the function.\n", first_non_prologue_insn.GetLoadAddress(target), first_non_prologue_insn.GetLoadAddress(target) - start_addr);
|
||||
result.GetOutputStream().Printf ("\n");
|
||||
}
|
||||
|
||||
UnwindPlanSP non_callsite_unwind_plan = func_unwinders_sp->GetUnwindPlanAtNonCallSite(*thread.get());
|
||||
if (non_callsite_unwind_plan.get())
|
||||
{
|
||||
result.GetOutputStream().Printf("Asynchronous (not restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
result.GetOutputStream().Printf("Asynchronous (not restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
non_callsite_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
|
||||
result.GetOutputStream().Printf ("\n");
|
||||
}
|
||||
|
|
@ -3414,7 +3414,7 @@ protected:
|
|||
UnwindPlanSP callsite_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(-1);
|
||||
if (callsite_unwind_plan.get())
|
||||
{
|
||||
result.GetOutputStream().Printf("Synchronous (restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
result.GetOutputStream().Printf("Synchronous (restricted to call-sites) UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
callsite_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
|
||||
result.GetOutputStream().Printf ("\n");
|
||||
}
|
||||
|
|
@ -3422,7 +3422,7 @@ protected:
|
|||
UnwindPlanSP arch_default_unwind_plan = func_unwinders_sp->GetUnwindPlanArchitectureDefault(*thread.get());
|
||||
if (arch_default_unwind_plan.get())
|
||||
{
|
||||
result.GetOutputStream().Printf("Architecture default UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
result.GetOutputStream().Printf("Architecture default UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
arch_default_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
|
||||
result.GetOutputStream().Printf ("\n");
|
||||
}
|
||||
|
|
@ -3430,7 +3430,7 @@ protected:
|
|||
UnwindPlanSP fast_unwind_plan = func_unwinders_sp->GetUnwindPlanFastUnwind(*thread.get());
|
||||
if (fast_unwind_plan.get())
|
||||
{
|
||||
result.GetOutputStream().Printf("Fast UnwindPlan for %s`%s (start addr 0x%llx):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
result.GetOutputStream().Printf("Fast UnwindPlan for %s`%s (start addr 0x%" PRIx64 "):\n", sc.module_sp->GetPlatformFileSpec().GetFilename().AsCString(), funcname.AsCString(), start_addr);
|
||||
fast_unwind_plan->Dump(result.GetOutputStream(), thread.get(), LLDB_INVALID_ADDRESS);
|
||||
result.GetOutputStream().Printf ("\n");
|
||||
}
|
||||
|
|
@ -4604,7 +4604,7 @@ public:
|
|||
case eInputReaderDone:
|
||||
if (!got_interrupted && !batch_mode)
|
||||
{
|
||||
out_stream->Printf ("Stop hook #%llu added.\n", new_stop_hook->GetID());
|
||||
out_stream->Printf ("Stop hook #%" PRIu64 " added.\n", new_stop_hook->GetID());
|
||||
out_stream->Flush();
|
||||
}
|
||||
break;
|
||||
|
|
@ -4690,7 +4690,7 @@ protected:
|
|||
{
|
||||
// Use one-liner.
|
||||
new_hook_sp->GetCommandPointer()->AppendString (m_options.m_one_liner.c_str());
|
||||
result.AppendMessageWithFormat("Stop hook #%llu added.\n", new_hook_sp->GetID());
|
||||
result.AppendMessageWithFormat("Stop hook #%" PRIu64 " added.\n", new_hook_sp->GetID());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ protected:
|
|||
// }
|
||||
process->GetThreadList().SetSelectedThreadByID (thread->GetID());
|
||||
result.SetDidChangeProcessState (true);
|
||||
result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
|
||||
result.SetStatus (eReturnStatusSuccessFinishNoResult);
|
||||
}
|
||||
else
|
||||
|
|
@ -723,7 +723,7 @@ public:
|
|||
thread->SetResumeState (eStateSuspended);
|
||||
}
|
||||
}
|
||||
result.AppendMessageWithFormat ("in process %llu\n", process->GetID());
|
||||
result.AppendMessageWithFormat ("in process %" PRIu64 "\n", process->GetID());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -741,7 +741,7 @@ public:
|
|||
Thread *thread = process->GetThreadList().GetThreadAtIndex(idx).get();
|
||||
if (thread == current_thread)
|
||||
{
|
||||
result.AppendMessageWithFormat ("Resuming thread 0x%4.4llx in process %llu\n", thread->GetID(), process->GetID());
|
||||
result.AppendMessageWithFormat ("Resuming thread 0x%4.4" PRIx64 " in process %" PRIu64 "\n", thread->GetID(), process->GetID());
|
||||
thread->SetResumeState (eStateRunning);
|
||||
}
|
||||
else
|
||||
|
|
@ -754,13 +754,13 @@ public:
|
|||
Error error (process->Resume());
|
||||
if (error.Success())
|
||||
{
|
||||
result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID());
|
||||
if (synchronous_execution)
|
||||
{
|
||||
state = process->WaitForProcessToStop (NULL);
|
||||
|
||||
result.SetDidChangeProcessState (true);
|
||||
result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
|
||||
result.SetStatus (eReturnStatusSuccessFinishNoResult);
|
||||
}
|
||||
else
|
||||
|
|
@ -1082,13 +1082,13 @@ protected:
|
|||
Error error (process->Resume ());
|
||||
if (error.Success())
|
||||
{
|
||||
result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " resuming\n", process->GetID());
|
||||
if (synchronous_execution)
|
||||
{
|
||||
StateType state = process->WaitForProcessToStop (NULL);
|
||||
|
||||
result.SetDidChangeProcessState (true);
|
||||
result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
|
||||
result.AppendMessageWithFormat ("Process %" PRIu64 " %s\n", process->GetID(), StateAsCString (state));
|
||||
result.SetStatus (eReturnStatusSuccessFinishNoResult);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1096,7 +1096,7 @@ protected:
|
|||
output_stream.EOL();
|
||||
result.SetStatus(eReturnStatusSuccessFinishResult);
|
||||
} else {
|
||||
result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%llx, size=%lu, variable expression='%s').\n",
|
||||
result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%lu, variable expression='%s').\n",
|
||||
addr, size, command.GetArgumentAtIndex(0));
|
||||
if (error.AsCString(NULL))
|
||||
result.AppendError(error.AsCString());
|
||||
|
|
@ -1286,7 +1286,7 @@ protected:
|
|||
output_stream.EOL();
|
||||
result.SetStatus(eReturnStatusSuccessFinishResult);
|
||||
} else {
|
||||
result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%llx, size=%lu).\n",
|
||||
result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%lu).\n",
|
||||
addr, size);
|
||||
if (error.AsCString(NULL))
|
||||
result.AppendError(error.AsCString());
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
|
|||
if (section_sp)
|
||||
{
|
||||
section_sp->DumpName(s);
|
||||
s->Printf (" + %llu", m_offset);
|
||||
s->Printf (" + %" PRIu64, m_offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -465,7 +465,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
|
|||
s->PutCString(symbol_name);
|
||||
addr_t delta = file_Addr - symbol->GetAddress().GetFileAddress();
|
||||
if (delta)
|
||||
s->Printf(" + %llu", delta);
|
||||
s->Printf(" + %" PRIu64, delta);
|
||||
showed_info = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -703,7 +703,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum
|
|||
if (var && var->LocationIsValidForAddress (*this))
|
||||
{
|
||||
s->Indent();
|
||||
s->Printf (" Variable: id = {0x%8.8llx}, name = \"%s\", type= \"%s\", location =",
|
||||
s->Printf (" Variable: id = {0x%8.8" PRIx64 "}, name = \"%s\", type= \"%s\", location =",
|
||||
var->GetID(),
|
||||
var->GetName().GetCString(),
|
||||
var->GetType()->GetName().GetCString());
|
||||
|
|
|
|||
|
|
@ -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", this, m_base_addr.GetSection().get(), m_base_addr.GetOffset(), GetByteSize());
|
||||
s->Printf("%p: AddressRange section = %p, offset = 0x%16.16" PRIx64 ", byte_size = 0x%16.16" PRIx64 "\n", this, m_base_addr.GetSection().get(), m_base_addr.GetOffset(), GetByteSize());
|
||||
}
|
||||
//
|
||||
//bool
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ AddressResolverFileLine::SearchCallback
|
|||
else
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("error: Unable to resolve address at file address 0x%llx for %s:%d\n",
|
||||
log->Printf ("error: Unable to resolve address at file address 0x%" PRIx64 " for %s:%d\n",
|
||||
line_start.GetFileAddress(),
|
||||
m_file_spec.GetFilename().AsCString("<Unknown>"),
|
||||
m_line_number);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ lldb_private::formatters::CallSelectorOnObject (ValueObject &valobj,
|
|||
StreamString expr_path_stream;
|
||||
valobj.GetExpressionPath(expr_path_stream, false);
|
||||
StreamString expr;
|
||||
expr.Printf("(%s)[%s %s:%lld]",return_type,expr_path_stream.GetData(),selector,index);
|
||||
expr.Printf("(%s)[%s %s:%" PRId64 "]",return_type,expr_path_stream.GetData(),selector,index);
|
||||
ExecutionContext exe_ctx (valobj.GetExecutionContextRef());
|
||||
lldb::ValueObjectSP result_sp;
|
||||
Target* target = exe_ctx.GetTargetPtr();
|
||||
|
|
@ -200,7 +200,7 @@ lldb_private::formatters::NSDictionarySummaryProvider (ValueObject& valobj, Stre
|
|||
return false;
|
||||
}
|
||||
|
||||
stream.Printf("%s%llu %s%s",
|
||||
stream.Printf("%s%" PRIu64 " %s%s",
|
||||
(name_entries ? "@\"" : ""),
|
||||
value,
|
||||
(name_entries ? (value == 1 ? "entry" : "entries") : (value == 1 ? "key/value pair" : "key/value pairs")),
|
||||
|
|
@ -266,7 +266,7 @@ lldb_private::formatters::NSArraySummaryProvider (ValueObject& valobj, Stream& s
|
|||
return false;
|
||||
}
|
||||
|
||||
stream.Printf("@\"%llu object%s\"",
|
||||
stream.Printf("@\"%" PRIu64 " object%s\"",
|
||||
value,
|
||||
value == 1 ? "" : "s");
|
||||
return true;
|
||||
|
|
@ -319,7 +319,7 @@ lldb_private::formatters::NSDataSummaryProvider (ValueObject& valobj, Stream& st
|
|||
return false;
|
||||
}
|
||||
|
||||
stream.Printf("%s%llu byte%s%s",
|
||||
stream.Printf("%s%" PRIu64 " byte%s%s",
|
||||
(needs_at ? "@\"" : ""),
|
||||
value,
|
||||
(value > 1 ? "s" : ""),
|
||||
|
|
@ -377,10 +377,10 @@ lldb_private::formatters::NSNumberSummaryProvider (ValueObject& valobj, Stream&
|
|||
stream.Printf("(int)%d",(int)value);
|
||||
break;
|
||||
case 12:
|
||||
stream.Printf("(long)%lld",value);
|
||||
stream.Printf("(long)%" PRId64,value);
|
||||
break;
|
||||
default:
|
||||
stream.Printf("absurd value:(info=%llu, value=%llu",i_bits,value);
|
||||
stream.Printf("absurd value:(info=%" PRIu64 ", value=%" PRIu64,i_bits,value);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -419,7 +419,7 @@ lldb_private::formatters::NSNumberSummaryProvider (ValueObject& valobj, Stream&
|
|||
value = process_sp->ReadUnsignedIntegerFromMemory(data_location, 8, 0, error);
|
||||
if (error.Fail())
|
||||
return false;
|
||||
stream.Printf("(long)%lld",value);
|
||||
stream.Printf("(long)%" PRId64,value);
|
||||
break;
|
||||
case 5: // 0B0101
|
||||
{
|
||||
|
|
@ -971,7 +971,7 @@ lldb_private::formatters::NSArrayISyntheticFrontEnd::GetChildAtIndex (uint32_t i
|
|||
if (error.Fail())
|
||||
return lldb::ValueObjectSP();
|
||||
StreamString expr;
|
||||
expr.Printf("(id)%llu",object_at_idx);
|
||||
expr.Printf("(id)%" PRIu64,object_at_idx);
|
||||
StreamString idx_name;
|
||||
idx_name.Printf("[%d]",idx);
|
||||
lldb::ValueObjectSP retval_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
|
||||
|
|
@ -1304,7 +1304,7 @@ lldb_private::formatters::NSDictionaryISyntheticFrontEnd::GetChildAtIndex (uint3
|
|||
{
|
||||
// make the new ValueObject
|
||||
StreamString expr;
|
||||
expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%llu ; _lldb_valgen_item.value = (id)%llu; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
|
||||
expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%" PRIu64 " ; _lldb_valgen_item.value = (id)%" PRIu64 "; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
|
||||
StreamString idx_name;
|
||||
idx_name.Printf("[%d]",idx);
|
||||
dict_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
|
||||
|
|
@ -1456,7 +1456,7 @@ lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::GetChildAtIndex (uint3
|
|||
{
|
||||
// make the new ValueObject
|
||||
StreamString expr;
|
||||
expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%llu ; _lldb_valgen_item.value = (id)%llu; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
|
||||
expr.Printf("struct __lldb_autogen_nspair { id key; id value; } _lldb_valgen_item; _lldb_valgen_item.key = (id)%" PRIu64 " ; _lldb_valgen_item.value = (id)%" PRIu64 "; _lldb_valgen_item;",dict_item.key_ptr,dict_item.val_ptr);
|
||||
StreamString idx_name;
|
||||
idx_name.Printf("[%d]",idx);
|
||||
dict_item.valobj_sp = ValueObject::CreateValueObjectFromExpression(idx_name.GetData(), expr.GetData(), m_exe_ctx_ref);
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ 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 = %llu, timeout = %u usec) connection = %p",
|
||||
"%p Communication::Read (dst = %p, dst_len = %" PRIu64 ", timeout = %u usec) connection = %p",
|
||||
this,
|
||||
dst,
|
||||
(uint64_t)dst_len,
|
||||
|
|
@ -210,7 +210,7 @@ Communication::Write (const void *src, size_t src_len, ConnectionStatus &status,
|
|||
|
||||
Mutex::Locker locker(m_write_mutex);
|
||||
lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
|
||||
"%p Communication::Write (src = %p, src_len = %llu) connection = %p",
|
||||
"%p Communication::Write (src = %p, src_len = %" PRIu64 ") connection = %p",
|
||||
this,
|
||||
src,
|
||||
(uint64_t)src_len,
|
||||
|
|
@ -295,7 +295,7 @@ 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 = %llu, broadcast = %i)",
|
||||
"%p Communication::AppendBytesToCache (src = %p, src_len = %" PRIu64 ", broadcast = %i)",
|
||||
this, bytes, (uint64_t)len, broadcast);
|
||||
if ((bytes == NULL || len == 0)
|
||||
&& (status != lldb::eConnectionStatusEndOfFile))
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ 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 = %llu)...",
|
||||
log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %" PRIu64 ")...",
|
||||
this, m_fd_recv, dst, (uint64_t)dst_len);
|
||||
|
||||
Mutex::Locker locker;
|
||||
|
|
@ -411,7 +411,7 @@ ConnectionFileDescriptor::Read (void *dst,
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %llu) => %lli, error = %s",
|
||||
log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %" PRIu64 ") => %" PRIi64 ", error = %s",
|
||||
this,
|
||||
m_fd_recv,
|
||||
dst,
|
||||
|
|
@ -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 = %llu)", this, src, (uint64_t)src_len);
|
||||
log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %" PRIu64 ")", this, src, (uint64_t)src_len);
|
||||
|
||||
if (!IsConnected ())
|
||||
{
|
||||
|
|
@ -530,7 +530,7 @@ 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 = %llu) => %lli (error = %s)",
|
||||
log->Printf ("%p ConnectionFileDescriptor::Write() ::write (fd = %i, src = %p, src_len = %" PRIu64 ") => %" PRIi64 " (error = %s)",
|
||||
this,
|
||||
m_fd_send,
|
||||
src,
|
||||
|
|
@ -540,7 +540,7 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
|
|||
break;
|
||||
|
||||
case eFDTypeSocket: // Socket requiring send/recv
|
||||
log->Printf ("%p ConnectionFileDescriptor::Write() ::send (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
|
||||
log->Printf ("%p ConnectionFileDescriptor::Write() ::send (socket = %i, src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64 " (error = %s)",
|
||||
this,
|
||||
m_fd_send,
|
||||
src,
|
||||
|
|
@ -550,7 +550,7 @@ ConnectionFileDescriptor::Write (const void *src, size_t src_len, ConnectionStat
|
|||
break;
|
||||
|
||||
case eFDTypeSocketUDP: // Unconnected UDP socket requiring sendto/recvfrom
|
||||
log->Printf ("%p ConnectionFileDescriptor::Write() ::sendto (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
|
||||
log->Printf ("%p ConnectionFileDescriptor::Write() ::sendto (socket = %i, src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64 " (error = %s)",
|
||||
this,
|
||||
m_fd_send,
|
||||
src,
|
||||
|
|
|
|||
|
|
@ -294,7 +294,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 = %llu", (int)sizeof(void*) * 2, this, parens, cstr, parens, (uint64_t)cstr_len);
|
||||
s->Printf("%*p: ConstString, string = %s%s%s, length = %" PRIu64, (int)sizeof(void*) * 2, this, parens, cstr, parens, (uint64_t)cstr_len);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ DataBufferMemoryMap::MemoryMapFromFileDescriptor (int fd,
|
|||
}
|
||||
if (error.GetError() == ENOMEM)
|
||||
{
|
||||
error.SetErrorStringWithFormat("could not allocate %lld bytes of memory to mmap in file", (uint64_t) length);
|
||||
error.SetErrorStringWithFormat("could not allocate %" PRId64 " bytes of memory to mmap in file", (uint64_t) length);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1408,7 +1408,7 @@ DataExtractor::Dump (Stream *s,
|
|||
s->EOL();
|
||||
}
|
||||
if (base_addr != LLDB_INVALID_ADDRESS)
|
||||
s->Printf ("0x%8.8llx: ", (uint64_t)(base_addr + (offset - start_offset)));
|
||||
s->Printf ("0x%8.8" PRIx64 ": ", (uint64_t)(base_addr + (offset - start_offset)));
|
||||
line_start_offset = offset;
|
||||
}
|
||||
else
|
||||
|
|
@ -1498,7 +1498,7 @@ DataExtractor::Dump (Stream *s,
|
|||
if (item_byte_size == 1)
|
||||
s->Printf ("\\x%2.2x", (uint8_t)ch);
|
||||
else
|
||||
s->Printf ("%llu", ch);
|
||||
s->Printf ("%" PRIu64, ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1516,7 +1516,7 @@ DataExtractor::Dump (Stream *s,
|
|||
case eFormatEnum: // Print enum value as a signed integer when we don't get the enum type
|
||||
case eFormatDecimal:
|
||||
if (item_byte_size <= 8)
|
||||
s->Printf ("%lld", GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
s->Printf ("%" PRId64, GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
else
|
||||
{
|
||||
const bool is_signed = true;
|
||||
|
|
@ -1527,7 +1527,7 @@ DataExtractor::Dump (Stream *s,
|
|||
|
||||
case eFormatUnsigned:
|
||||
if (item_byte_size <= 8)
|
||||
s->Printf ("%llu", GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
s->Printf ("%" PRIu64, GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
else
|
||||
{
|
||||
const bool is_signed = false;
|
||||
|
|
@ -1538,7 +1538,7 @@ DataExtractor::Dump (Stream *s,
|
|||
|
||||
case eFormatOctal:
|
||||
if (item_byte_size <= 8)
|
||||
s->Printf ("0%llo", GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
s->Printf ("0%" PRIo64, GetMaxS64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
else
|
||||
{
|
||||
const bool is_signed = false;
|
||||
|
|
@ -1632,8 +1632,8 @@ DataExtractor::Dump (Stream *s,
|
|||
|
||||
if (complex_int_byte_size <= 8)
|
||||
{
|
||||
s->Printf("%llu", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
|
||||
s->Printf(" + %llui", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
|
||||
s->Printf("%" PRIu64, GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
|
||||
s->Printf(" + %" PRIu64 "i", GetMaxU64Bitfield(&offset, complex_int_byte_size, 0, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1682,7 +1682,7 @@ DataExtractor::Dump (Stream *s,
|
|||
bool wantsuppercase = (item_format == eFormatHexUppercase);
|
||||
if (item_byte_size <= 8)
|
||||
{
|
||||
s->Printf(wantsuppercase ? "0x%*.*llX" : "0x%*.*llx", 2 * item_byte_size, 2 * item_byte_size, GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
s->Printf(wantsuppercase ? "0x%*.*" PRIX64 : "0x%*.*" PRIx64, 2 * item_byte_size, 2 * item_byte_size, GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1746,7 +1746,7 @@ DataExtractor::Dump (Stream *s,
|
|||
case eFormatAddressInfo:
|
||||
{
|
||||
addr_t addr = GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset);
|
||||
s->Printf("0x%*.*llx", 2 * item_byte_size, 2 * item_byte_size, addr);
|
||||
s->Printf("0x%*.*" PRIx64, 2 * item_byte_size, 2 * item_byte_size, addr);
|
||||
if (exe_scope)
|
||||
{
|
||||
TargetSP target_sp (exe_scope->CalculateTarget());
|
||||
|
|
@ -1923,7 +1923,7 @@ DataExtractor::PutToLog
|
|||
}
|
||||
// Reset string offset and fill the current line string with address:
|
||||
if (base_addr != LLDB_INVALID_ADDRESS)
|
||||
sstr.Printf("0x%8.8llx:", (uint64_t)(base_addr + (offset - start_offset)));
|
||||
sstr.Printf("0x%8.8" PRIx64 ":", (uint64_t)(base_addr + (offset - start_offset)));
|
||||
}
|
||||
|
||||
switch (type)
|
||||
|
|
@ -1938,10 +1938,10 @@ DataExtractor::PutToLog
|
|||
break;
|
||||
case TypeUInt16: sstr.Printf (format ? format : " %4.4x", GetU16(&offset)); break;
|
||||
case TypeUInt32: sstr.Printf (format ? format : " %8.8x", GetU32(&offset)); break;
|
||||
case TypeUInt64: sstr.Printf (format ? format : " %16.16llx", GetU64(&offset)); break;
|
||||
case TypePointer: sstr.Printf (format ? format : " 0x%llx", GetAddress(&offset)); break;
|
||||
case TypeULEB128: sstr.Printf (format ? format : " 0x%llx", GetULEB128(&offset)); break;
|
||||
case TypeSLEB128: sstr.Printf (format ? format : " %lld", GetSLEB128(&offset)); break;
|
||||
case TypeUInt64: sstr.Printf (format ? format : " %16.16" PRIx64, GetU64(&offset)); break;
|
||||
case TypePointer: sstr.Printf (format ? format : " 0x%" PRIx64, GetAddress(&offset)); break;
|
||||
case TypeULEB128: sstr.Printf (format ? format : " 0x%" PRIx64, GetULEB128(&offset)); break;
|
||||
case TypeSLEB128: sstr.Printf (format ? format : " %" PRId64, GetSLEB128(&offset)); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1187,7 +1187,7 @@ ScanBracketedRange (const char* var_name_begin,
|
|||
*index_lower = ::strtoul (*open_bracket_position+1, &end, 0);
|
||||
*index_higher = *index_lower;
|
||||
if (log)
|
||||
log->Printf("[ScanBracketedRange] [%lld] detected, high index is same", *index_lower);
|
||||
log->Printf("[ScanBracketedRange] [%" PRId64 "] detected, high index is same", *index_lower);
|
||||
}
|
||||
else if (*close_bracket_position && *close_bracket_position < var_name_end)
|
||||
{
|
||||
|
|
@ -1195,7 +1195,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("[ScanBracketedRange] [%lld-%lld] detected", *index_lower, *index_higher);
|
||||
log->Printf("[ScanBracketedRange] [%" PRId64 "-%" PRId64 "] detected", *index_lower, *index_higher);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1642,7 +1642,7 @@ Debugger::FormatPrompt
|
|||
if (!item)
|
||||
{
|
||||
if (log)
|
||||
log->Printf("[Debugger::FormatPrompt] ERROR in getting child item at index %lld", index_lower);
|
||||
log->Printf("[Debugger::FormatPrompt] ERROR in getting child item at index %" PRId64, index_lower);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1898,7 +1898,7 @@ Debugger::FormatPrompt
|
|||
var_name_begin += ::strlen ("process.");
|
||||
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
|
||||
{
|
||||
s.Printf("%llu", process->GetID());
|
||||
s.Printf("%" PRIu64, process->GetID());
|
||||
var_success = true;
|
||||
}
|
||||
else if ((::strncmp (var_name_begin, "name}", strlen("name}")) == 0) ||
|
||||
|
|
@ -1936,7 +1936,7 @@ Debugger::FormatPrompt
|
|||
var_name_begin += ::strlen ("thread.");
|
||||
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
|
||||
{
|
||||
s.Printf("0x%4.4llx", thread->GetID());
|
||||
s.Printf("0x%4.4" PRIx64, thread->GetID());
|
||||
var_success = true;
|
||||
}
|
||||
else if (::strncmp (var_name_begin, "index}", strlen("index}")) == 0)
|
||||
|
|
@ -2144,7 +2144,7 @@ Debugger::FormatPrompt
|
|||
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
|
||||
{
|
||||
if (sc->function)
|
||||
s.Printf("function{0x%8.8llx}", sc->function->GetID());
|
||||
s.Printf("function{0x%8.8" PRIx64 "}", sc->function->GetID());
|
||||
else
|
||||
s.Printf("symbol[%u]", sc->symbol->GetID());
|
||||
|
||||
|
|
@ -2430,9 +2430,9 @@ Debugger::FormatPrompt
|
|||
addr_t func_file_addr = func_addr.GetFileAddress();
|
||||
addr_t addr_file_addr = format_addr.GetFileAddress();
|
||||
if (addr_file_addr > func_file_addr)
|
||||
s.Printf(" + %llu", addr_file_addr - func_file_addr);
|
||||
s.Printf(" + %" PRIu64, addr_file_addr - func_file_addr);
|
||||
else if (addr_file_addr < func_file_addr)
|
||||
s.Printf(" - %llu", func_file_addr - addr_file_addr);
|
||||
s.Printf(" - %" PRIu64, func_file_addr - addr_file_addr);
|
||||
var_success = true;
|
||||
}
|
||||
else
|
||||
|
|
@ -2443,9 +2443,9 @@ Debugger::FormatPrompt
|
|||
addr_t func_load_addr = func_addr.GetLoadAddress (target);
|
||||
addr_t addr_load_addr = format_addr.GetLoadAddress (target);
|
||||
if (addr_load_addr > func_load_addr)
|
||||
s.Printf(" + %llu", addr_load_addr - func_load_addr);
|
||||
s.Printf(" + %" PRIu64, addr_load_addr - func_load_addr);
|
||||
else if (addr_load_addr < func_load_addr)
|
||||
s.Printf(" - %llu", func_load_addr - addr_load_addr);
|
||||
s.Printf(" - %" PRIu64, func_load_addr - addr_load_addr);
|
||||
var_success = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2465,7 +2465,7 @@ Debugger::FormatPrompt
|
|||
int addr_width = target->GetArchitecture().GetAddressByteSize() * 2;
|
||||
if (addr_width == 0)
|
||||
addr_width = 16;
|
||||
s.Printf("0x%*.*llx", addr_width, addr_width, vaddr);
|
||||
s.Printf("0x%*.*" PRIx64, addr_width, addr_width, vaddr);
|
||||
var_success = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ EmulateInstruction::ReadMemoryDefault (EmulateInstruction *instruction,
|
|||
size_t length)
|
||||
{
|
||||
StreamFile strm (stdout, false);
|
||||
strm.Printf (" Read from Memory (address = 0x%llx, length = %llu, context = ", addr, (uint64_t)length);
|
||||
strm.Printf (" Read from Memory (address = 0x%" PRIx64 ", length = %" PRIu64 ", 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 = %llu, context = ", addr, (uint64_t)length);
|
||||
strm.Printf (" Write to Memory (address = 0x%" PRIx64 ", length = %" PRIu64 ", context = ", addr, (uint64_t)length);
|
||||
context.Dump (strm, instruction);
|
||||
strm.EOL();
|
||||
return length;
|
||||
|
|
@ -503,7 +503,7 @@ EmulateInstruction::Context::Dump (Stream &strm,
|
|||
{
|
||||
case eInfoTypeRegisterPlusOffset:
|
||||
{
|
||||
strm.Printf (" (reg_plus_offset = %s%+lld)",
|
||||
strm.Printf (" (reg_plus_offset = %s%+" PRId64 ")",
|
||||
info.RegisterPlusOffset.reg.name,
|
||||
info.RegisterPlusOffset.signed_offset);
|
||||
}
|
||||
|
|
@ -519,7 +519,7 @@ EmulateInstruction::Context::Dump (Stream &strm,
|
|||
|
||||
case eInfoTypeRegisterToRegisterPlusOffset:
|
||||
{
|
||||
strm.Printf (" (base_and_imm_offset = %s%+lld, data_reg = %s)",
|
||||
strm.Printf (" (base_and_imm_offset = %s%+" PRId64 ", data_reg = %s)",
|
||||
info.RegisterToRegisterPlusOffset.base_reg.name,
|
||||
info.RegisterToRegisterPlusOffset.offset,
|
||||
info.RegisterToRegisterPlusOffset.data_reg.name);
|
||||
|
|
@ -544,7 +544,7 @@ EmulateInstruction::Context::Dump (Stream &strm,
|
|||
break;
|
||||
|
||||
case eInfoTypeOffset:
|
||||
strm.Printf (" (signed_offset = %+lld)", info.signed_offset);
|
||||
strm.Printf (" (signed_offset = %+" PRId64 ")", info.signed_offset);
|
||||
break;
|
||||
|
||||
case eInfoTypeRegister:
|
||||
|
|
@ -552,19 +552,19 @@ EmulateInstruction::Context::Dump (Stream &strm,
|
|||
break;
|
||||
|
||||
case eInfoTypeImmediate:
|
||||
strm.Printf (" (unsigned_immediate = %llu (0x%16.16llx))",
|
||||
strm.Printf (" (unsigned_immediate = %" PRIu64 " (0x%16.16" PRIx64 "))",
|
||||
info.unsigned_immediate,
|
||||
info.unsigned_immediate);
|
||||
break;
|
||||
|
||||
case eInfoTypeImmediateSigned:
|
||||
strm.Printf (" (signed_immediate = %+lld (0x%16.16llx))",
|
||||
strm.Printf (" (signed_immediate = %+" PRId64 " (0x%16.16" PRIx64 "))",
|
||||
info.signed_immediate,
|
||||
info.signed_immediate);
|
||||
break;
|
||||
|
||||
case eInfoTypeAddress:
|
||||
strm.Printf (" (address = 0x%llx)", info.address);
|
||||
strm.Printf (" (address = 0x%" PRIx64 ")", info.address);
|
||||
break;
|
||||
|
||||
case eInfoTypeISAAndImmediate:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "lldb/Core/History.h"
|
||||
|
||||
// C Includes
|
||||
#include <inttypes.h>
|
||||
// C++ Includes
|
||||
// Other libraries and framework includes
|
||||
// Project includes
|
||||
|
|
@ -21,5 +22,5 @@ using namespace lldb_private;
|
|||
void
|
||||
HistorySourceUInt::DumpHistoryEvent (Stream &strm, HistoryEvent event)
|
||||
{
|
||||
strm.Printf ("%s %llu", m_name.c_str(), (uint64_t)((uintptr_t)event));
|
||||
strm.Printf ("%s %" PRIu64, m_name.c_str(), (uint64_t)((uintptr_t)event));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ 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 ("%9ld.%6.6d ", tv.tv_sec, tv.tv_usec);
|
||||
header.Printf ("%9ld.%6.6ld ", tv.tv_sec, tv.tv_usec);
|
||||
}
|
||||
|
||||
// Add the process and thread if requested
|
||||
if (m_options.Test (LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD))
|
||||
header.Printf ("[%4.4x/%4.4llx]: ", getpid(), Host::GetCurrentThreadID());
|
||||
header.Printf ("[%4.4x/%4.4" PRIx64 "]: ", getpid(), Host::GetCurrentThreadID());
|
||||
|
||||
// Add the process and thread if requested
|
||||
if (m_options.Test (LLDB_LOG_OPTION_PREPEND_THREAD_NAME))
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ namespace lldb {
|
|||
Mutex::Locker locker (Module::GetAllocationModuleCollectionMutex());
|
||||
ModuleCollection &modules = GetModuleCollection();
|
||||
const size_t count = modules.size();
|
||||
printf ("%s: %llu modules:\n", __PRETTY_FUNCTION__, (uint64_t)count);
|
||||
printf ("%s: %" PRIu64 " modules:\n", __PRETTY_FUNCTION__, (uint64_t)count);
|
||||
for (size_t i=0; i<count; ++i)
|
||||
{
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ Module::GetMemoryObjectFile (const lldb::ProcessSP &process_sp, lldb::addr_t hea
|
|||
if (m_objfile_sp)
|
||||
{
|
||||
StreamString s;
|
||||
s.Printf("0x%16.16llx", header_addr);
|
||||
s.Printf("0x%16.16" PRIx64, header_addr);
|
||||
m_object_name.SetCString (s.GetData());
|
||||
|
||||
// Once we get the object file, update our module with the object file's
|
||||
|
|
@ -429,7 +429,7 @@ bool
|
|||
Module::ResolveFileAddress (lldb::addr_t vm_addr, Address& so_addr)
|
||||
{
|
||||
Mutex::Locker locker (m_mutex);
|
||||
Timer scoped_timer(__PRETTY_FUNCTION__, "Module::ResolveFileAddress (vm_addr = 0x%llx)", vm_addr);
|
||||
Timer scoped_timer(__PRETTY_FUNCTION__, "Module::ResolveFileAddress (vm_addr = 0x%" PRIx64 ")", vm_addr);
|
||||
ObjectFile* ofile = GetObjectFile();
|
||||
if (ofile)
|
||||
return so_addr.ResolveAddressUsingFileSections(vm_addr, ofile->GetSectionList());
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ Opcode::Dump (Stream *s, uint32_t min_byte_width)
|
|||
break;
|
||||
|
||||
case Opcode::eType64:
|
||||
bytes_written = s->Printf ("0x%16.16llx", m_data.inst64);
|
||||
bytes_written = s->Printf ("0x%16.16" PRIx64, m_data.inst64);
|
||||
break;
|
||||
|
||||
case Opcode::eTypeBytes:
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ RegisterValue::SetValueFromCString (const RegisterInfo *reg_info, const char *va
|
|||
if (!success)
|
||||
error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
|
||||
else if (!Args::UInt64ValueIsValidForByteSize (uval64, byte_size))
|
||||
error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
|
||||
error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
|
||||
else
|
||||
{
|
||||
if (!SetUInt (uval64, reg_info->byte_size))
|
||||
|
|
@ -483,7 +483,7 @@ RegisterValue::SetValueFromCString (const RegisterInfo *reg_info, const char *va
|
|||
if (!success)
|
||||
error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
|
||||
else if (!Args::SInt64ValueIsValidForByteSize (sval64, byte_size))
|
||||
error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte signed integer value", sval64, byte_size);
|
||||
error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte signed integer value", sval64, byte_size);
|
||||
else
|
||||
{
|
||||
if (!SetUInt (sval64, reg_info->byte_size))
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "lldb/Core/Scalar.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "lldb/Interpreter/Args.h"
|
||||
#include "lldb/Core/Error.h"
|
||||
|
|
@ -1833,7 +1834,7 @@ Scalar::SetValueFromCString (const char *value_str, Encoding encoding, uint32_t
|
|||
if (!success)
|
||||
error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
|
||||
else if (!UIntValueIsValidForSize (uval64, byte_size))
|
||||
error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
|
||||
error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte unsigned integer value", uval64, byte_size);
|
||||
else
|
||||
{
|
||||
m_type = Scalar::GetValueTypeForUnsignedIntegerWithByteSize (byte_size);
|
||||
|
|
@ -1862,7 +1863,7 @@ Scalar::SetValueFromCString (const char *value_str, Encoding encoding, uint32_t
|
|||
if (!success)
|
||||
error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
|
||||
else if (!SIntValueIsValidForSize (sval64, byte_size))
|
||||
error.SetErrorStringWithFormat ("value 0x%llx is too large to fit in a %u byte signed integer value", sval64, byte_size);
|
||||
error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %u byte signed integer value", sval64, byte_size);
|
||||
else
|
||||
{
|
||||
m_type = Scalar::GetValueTypeForSignedIntegerWithByteSize (byte_size);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ Section::Section (const ModuleSP &module_sp,
|
|||
m_linked_section_wp(),
|
||||
m_linked_offset (0)
|
||||
{
|
||||
// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16llx, addr=[0x%16.16llx - 0x%16.16llx), file [0x%16.16llx - 0x%16.16llx), flags = 0x%8.8x, name = %s\n",
|
||||
// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s\n",
|
||||
// this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, name.GetCString());
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ Section::Section (const lldb::SectionSP &parent_section_sp,
|
|||
m_linked_section_wp(),
|
||||
m_linked_offset (0)
|
||||
{
|
||||
// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16llx, addr=[0x%16.16llx - 0x%16.16llx), file [0x%16.16llx - 0x%16.16llx), flags = 0x%8.8x, name = %s.%s\n",
|
||||
// printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s.%s\n",
|
||||
// this, module_sp.get(), sect_id, file_addr, file_addr + byte_size, file_offset, file_offset + file_size, flags, parent_section_sp->GetName().GetCString(), name.GetCString());
|
||||
if (parent_section_sp)
|
||||
m_parent_wp = parent_section_sp;
|
||||
|
|
@ -257,7 +257,7 @@ Section::Dump (Stream *s, Target *target, uint32_t depth) const
|
|||
{
|
||||
// s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
|
||||
s->Indent();
|
||||
s->Printf("0x%8.8llx %-16s ", GetID(), GetSectionTypeAsCString (m_type));
|
||||
s->Printf("0x%8.8" PRIx64 " %-16s ", GetID(), GetSectionTypeAsCString (m_type));
|
||||
bool resolved = true;
|
||||
addr_t addr = LLDB_INVALID_ADDRESS;
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ Section::Dump (Stream *s, Target *target, uint32_t depth) const
|
|||
range.Dump (s, 0);
|
||||
}
|
||||
|
||||
s->Printf("%c 0x%8.8llx 0x%8.8llx 0x%8.8x ", resolved ? ' ' : '*', m_file_offset, m_file_size, Get());
|
||||
s->Printf("%c 0x%8.8" PRIx64 " 0x%8.8" PRIx64 " 0x%8.8x ", resolved ? ' ' : '*', m_file_offset, m_file_size, Get());
|
||||
|
||||
DumpName (s);
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ Section::Dump (Stream *s, Target *target, uint32_t depth) const
|
|||
s->Printf("%c%*.*s", resolved ? ' ' : '*', indent, indent, "");
|
||||
|
||||
linked_section_sp->DumpName(s);
|
||||
s->Printf(" + 0x%llx\n", m_linked_offset);
|
||||
s->Printf(" + 0x%" PRIx64 "\n", m_linked_offset);
|
||||
}
|
||||
|
||||
if (depth > 0)
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
|
|
@ -85,7 +87,7 @@ Stream::PutSLEB128 (int64_t sval)
|
|||
}
|
||||
else
|
||||
{
|
||||
bytes_written = Printf ("0x%lli", sval);
|
||||
bytes_written = Printf ("0x%" PRIi64, sval);
|
||||
}
|
||||
|
||||
return bytes_written;
|
||||
|
|
@ -117,7 +119,7 @@ Stream::PutULEB128 (uint64_t uval)
|
|||
}
|
||||
else
|
||||
{
|
||||
bytes_written = Printf ("0x%llx", uval);
|
||||
bytes_written = Printf ("0x%" PRIx64, uval);
|
||||
}
|
||||
return bytes_written;
|
||||
}
|
||||
|
|
@ -157,8 +159,8 @@ Stream::Address (uint64_t addr, int addr_size, const char *prefix, const char *s
|
|||
if (suffix == NULL)
|
||||
suffix = "";
|
||||
// int addr_width = m_addr_size << 1;
|
||||
// Printf ("%s0x%0*llx%s", prefix, addr_width, addr, suffix);
|
||||
Printf ("%s0x%0*llx%s", prefix, addr_size * 2, (uint64_t)addr, suffix);
|
||||
// Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_width, addr, suffix);
|
||||
Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_size * 2, (uint64_t)addr, suffix);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
|
@ -364,7 +366,7 @@ Stream::operator<< (int32_t sval)
|
|||
Stream&
|
||||
Stream::operator<< (int64_t sval)
|
||||
{
|
||||
Printf ("%lli", sval);
|
||||
Printf ("%" PRIi64, sval);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include "lldb/Core/UserID.h"
|
||||
#include "lldb/Core/Stream.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
|
|
@ -20,6 +22,6 @@ UserID::~UserID ()
|
|||
Stream&
|
||||
lldb_private::operator << (Stream& strm, const UserID& uid)
|
||||
{
|
||||
strm.Printf("{0x%8.8llx}", uid.GetID());
|
||||
strm.Printf("{0x%8.8" PRIx64 "}", uid.GetID());
|
||||
return strm;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -456,14 +456,14 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
|
|||
if (module)
|
||||
{
|
||||
if (variable)
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx for variable '%s' in %s%s%s",
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64 " for variable '%s' in %s%s%s",
|
||||
address,
|
||||
variable->GetName().AsCString(""),
|
||||
module->GetFileSpec().GetDirectory().GetCString(),
|
||||
module->GetFileSpec().GetDirectory() ? "/" : "",
|
||||
module->GetFileSpec().GetFilename().GetCString());
|
||||
else
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx in %s%s%s",
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64 " in %s%s%s",
|
||||
address,
|
||||
module->GetFileSpec().GetDirectory().GetCString(),
|
||||
module->GetFileSpec().GetDirectory() ? "/" : "",
|
||||
|
|
@ -472,11 +472,11 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
|
|||
else
|
||||
{
|
||||
if (variable)
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx for variable '%s'",
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64 " for variable '%s'",
|
||||
address,
|
||||
variable->GetName().AsCString(""));
|
||||
else
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%llx", address);
|
||||
error.SetErrorStringWithFormat ("unable to resolve the module for file address 0x%" PRIx64, address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -555,7 +555,7 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
|
|||
const bool prefer_file_cache = false;
|
||||
if (exe_ctx->GetTargetRef().ReadMemory(file_so_addr, prefer_file_cache, dst, byte_size, error) != byte_size)
|
||||
{
|
||||
error.SetErrorStringWithFormat("read memory from 0x%llx failed", (uint64_t)address);
|
||||
error.SetErrorStringWithFormat("read memory from 0x%" PRIx64 " failed", (uint64_t)address);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -570,14 +570,14 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
|
|||
{
|
||||
const size_t bytes_read = process->ReadMemory(address, dst, byte_size, error);
|
||||
if (bytes_read != byte_size)
|
||||
error.SetErrorStringWithFormat("read memory from 0x%llx failed (%u of %u bytes read)",
|
||||
error.SetErrorStringWithFormat("read memory from 0x%" PRIx64 " failed (%u of %u bytes read)",
|
||||
(uint64_t)address,
|
||||
(uint32_t)bytes_read,
|
||||
(uint32_t)byte_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
error.SetErrorStringWithFormat("read memory from 0x%llx failed (invalid process)", (uint64_t)address);
|
||||
error.SetErrorStringWithFormat("read memory from 0x%" PRIx64 " failed (invalid process)", (uint64_t)address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1431,14 +1431,14 @@ ClangASTSource::layoutRecordType(const RecordDecl *record,
|
|||
{
|
||||
log->Printf("LRT[%u] returned:", current_id);
|
||||
log->Printf("LRT[%u] Original = (RecordDecl*)%p", current_id, origin_record.decl);
|
||||
log->Printf("LRT[%u] Size = %lld", current_id, size);
|
||||
log->Printf("LRT[%u] Alignment = %lld", current_id, alignment);
|
||||
log->Printf("LRT[%u] Size = %" PRId64, current_id, size);
|
||||
log->Printf("LRT[%u] Alignment = %" PRId64, current_id, alignment);
|
||||
log->Printf("LRT[%u] Fields:", current_id);
|
||||
for (RecordDecl::field_iterator fi = record->field_begin(), fe = record->field_end();
|
||||
fi != fe;
|
||||
++fi)
|
||||
{
|
||||
log->Printf("LRT[%u] (FieldDecl*)%p, Name = '%s', Offset = %lld bits",
|
||||
log->Printf("LRT[%u] (FieldDecl*)%p, Name = '%s', Offset = %" PRId64 " bits",
|
||||
current_id,
|
||||
*fi,
|
||||
fi->getNameAsString().c_str(),
|
||||
|
|
@ -1459,7 +1459,7 @@ ClangASTSource::layoutRecordType(const RecordDecl *record,
|
|||
DeclFromParser <RecordDecl> base_record(base_record_type->getDecl());
|
||||
DeclFromParser <CXXRecordDecl> base_cxx_record = DynCast<CXXRecordDecl>(base_record);
|
||||
|
||||
log->Printf("LRT[%u] %s(CXXRecordDecl*)%p, Name = '%s', Offset = %lld chars",
|
||||
log->Printf("LRT[%u] %s(CXXRecordDecl*)%p, Name = '%s', Offset = %" PRId64 " chars",
|
||||
current_id,
|
||||
(is_virtual ? "Virtual " : ""),
|
||||
base_cxx_record.decl,
|
||||
|
|
|
|||
|
|
@ -1499,7 +1499,7 @@ ClangExpressionDeclMap::DoMaterialize
|
|||
|
||||
if (mem == LLDB_INVALID_ADDRESS)
|
||||
{
|
||||
err.SetErrorStringWithFormat("Couldn't allocate 0x%llx bytes for materialized argument struct",
|
||||
err.SetErrorStringWithFormat("Couldn't allocate 0x%llx bytes for materialized argument struct",
|
||||
(unsigned long long)(m_struct_vars->m_struct_alignment + m_struct_vars->m_struct_size));
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1683,7 +1683,7 @@ ClangExpressionDeclMap::DoMaterializeOnePersistentVariable
|
|||
mem = var_sp->m_live_sp->GetValue().GetScalar().ULongLong();
|
||||
|
||||
if (log)
|
||||
log->Printf("Dematerializing %s from 0x%llx (size = %u)", var_sp->GetName().GetCString(), (uint64_t)mem, (unsigned)pvar_byte_size);
|
||||
log->Printf("Dematerializing %s from 0x%" PRIx64 " (size = %u)", var_sp->GetName().GetCString(), (uint64_t)mem, (unsigned)pvar_byte_size);
|
||||
|
||||
// Read the contents of the spare memory area
|
||||
|
||||
|
|
@ -1758,7 +1758,7 @@ ClangExpressionDeclMap::DoMaterializeOnePersistentVariable
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Allocated %s (0x%llx) sucessfully", var_sp->GetName().GetCString(), mem);
|
||||
log->Printf("Allocated %s (0x%" PRIx64 ") sucessfully", var_sp->GetName().GetCString(), mem);
|
||||
|
||||
// Put the location of the spare memory into the live data of the ValueObject.
|
||||
|
||||
|
|
@ -3398,7 +3398,7 @@ ClangExpressionDeclMap::AddOneFunction (NameSearchContext &context,
|
|||
// We failed to copy the type we found
|
||||
if (log)
|
||||
{
|
||||
log->Printf (" Failed to import the function type '%s' {0x%8.8llx} into the expression parser AST contenxt",
|
||||
log->Printf (" Failed to import the function type '%s' {0x%8.8" PRIx64 "} into the expression parser AST contenxt",
|
||||
fun_type->GetName().GetCString(),
|
||||
fun_type->GetID());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -733,7 +733,7 @@ ClangExpressionParser::DisassembleFunction (Stream &stream, ExecutionContext &ex
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Found function, has local address 0x%llx and remote address 0x%llx", (uint64_t)func_local_addr, (uint64_t)func_remote_addr);
|
||||
log->Printf("Found function, has local address 0x%" PRIx64 " and remote address 0x%" PRIx64, (uint64_t)func_local_addr, (uint64_t)func_remote_addr);
|
||||
|
||||
std::pair <lldb::addr_t, lldb::addr_t> func_range;
|
||||
|
||||
|
|
@ -747,7 +747,7 @@ ClangExpressionParser::DisassembleFunction (Stream &stream, ExecutionContext &ex
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Function's code range is [0x%llx+0x%llx]", func_range.first, func_range.second);
|
||||
log->Printf("Function's code range is [0x%" PRIx64 "+0x%" PRIx64 "]", func_range.first, func_range.second);
|
||||
|
||||
Target *target = exe_ctx.GetTargetPtr();
|
||||
if (!target)
|
||||
|
|
|
|||
|
|
@ -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_%llu", (uint64_t)i);
|
||||
snprintf(arg_buf, 31, "arg_%" PRIu64, (uint64_t)i);
|
||||
args_buffer.push_back (' ');
|
||||
args_buffer.append (arg_buf);
|
||||
args_buffer.append (";\n");
|
||||
|
|
@ -389,7 +389,7 @@ ClangFunction::InsertFunction (ExecutionContext &exe_ctx, lldb::addr_t &args_add
|
|||
|
||||
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
|
||||
if (log)
|
||||
log->Printf ("Call Address: 0x%llx Struct Address: 0x%llx.\n", m_jit_start_addr, args_addr_ref);
|
||||
log->Printf ("Call Address: 0x%" PRIx64 " Struct Address: 0x%" PRIx64 ".\n", m_jit_start_addr, args_addr_ref);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -463,19 +463,19 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream,
|
|||
#if 0
|
||||
// jingham: look here
|
||||
StreamFile logfile ("/tmp/exprs.txt", "a");
|
||||
logfile.Printf("0x%16.16llx: thread = 0x%4.4x, expr = '%s'\n", m_jit_start_addr, exe_ctx.thread ? exe_ctx.thread->GetID() : -1, m_expr_text.c_str());
|
||||
logfile.Printf("0x%16.16" PRIx64 ": thread = 0x%4.4x, expr = '%s'\n", m_jit_start_addr, exe_ctx.thread ? exe_ctx.thread->GetID() : -1, m_expr_text.c_str());
|
||||
#endif
|
||||
|
||||
if (log)
|
||||
{
|
||||
log->Printf("-- [ClangUserExpression::PrepareToExecuteJITExpression] Materializing for execution --");
|
||||
|
||||
log->Printf(" Function address : 0x%llx", (uint64_t)m_jit_start_addr);
|
||||
log->Printf(" Function address : 0x%" PRIx64, (uint64_t)m_jit_start_addr);
|
||||
|
||||
if (m_needs_object_ptr)
|
||||
log->Printf(" Object pointer : 0x%llx", (uint64_t)object_ptr);
|
||||
log->Printf(" Object pointer : 0x%" PRIx64, (uint64_t)object_ptr);
|
||||
|
||||
log->Printf(" Structure address : 0x%llx", (uint64_t)struct_address);
|
||||
log->Printf(" Structure address : 0x%" PRIx64, (uint64_t)struct_address);
|
||||
|
||||
StreamString args;
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ ClangUtilityFunction::Install (Stream &error_stream,
|
|||
#if 0
|
||||
// jingham: look here
|
||||
StreamFile logfile ("/tmp/exprs.txt", "a");
|
||||
logfile.Printf ("0x%16.16llx: func = %s, source =\n%s\n",
|
||||
logfile.Printf ("0x%16.16" PRIx64 ": func = %s, source =\n%s\n",
|
||||
m_jit_start_addr,
|
||||
m_function_name.c_str(),
|
||||
m_function_text.c_str());
|
||||
|
|
|
|||
|
|
@ -322,10 +322,10 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
|
|||
case DW_OP_const2s: s->Printf("DW_OP_const2s(0x%4.4x) ", m_data.GetU16(&offset)); break; // 0x0b 1 2-byte constant
|
||||
case DW_OP_const4u: s->Printf("DW_OP_const4u(0x%8.8x) ", m_data.GetU32(&offset)); break; // 0x0c 1 4-byte constant
|
||||
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%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_const8u: s->Printf("DW_OP_const8u(0x%16.16" PRIx64 ") ", m_data.GetU64(&offset)); break; // 0x0e 1 8-byte constant
|
||||
case DW_OP_const8s: s->Printf("DW_OP_const8s(0x%16.16" PRIx64 ") ", m_data.GetU64(&offset)); break; // 0x0f 1 8-byte constant
|
||||
case DW_OP_constu: s->Printf("DW_OP_constu(0x%" PRIx64 ") ", m_data.GetULEB128(&offset)); break; // 0x10 1 ULEB128 constant
|
||||
case DW_OP_consts: s->Printf("DW_OP_consts(0x%" PRId64 ") ", 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
|
||||
|
|
@ -344,7 +344,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%llx) ", m_data.GetULEB128(&offset));
|
||||
s->Printf("DW_OP_plus_uconst(0x%" PRIx64 ") ", m_data.GetULEB128(&offset));
|
||||
break;
|
||||
|
||||
case DW_OP_shl: s->PutCString("DW_OP_shl"); break; // 0x24
|
||||
|
|
@ -490,17 +490,17 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
|
|||
{
|
||||
if (reg_info.name)
|
||||
{
|
||||
s->Printf("[%s%+lli]", reg_info.name, reg_offset);
|
||||
s->Printf("[%s%+" PRIi64 "]", reg_info.name, reg_offset);
|
||||
break;
|
||||
}
|
||||
else if (reg_info.alt_name)
|
||||
{
|
||||
s->Printf("[%s%+lli]", reg_info.alt_name, reg_offset);
|
||||
s->Printf("[%s%+" PRIi64 "]", reg_info.alt_name, reg_offset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
s->Printf("DW_OP_breg%i(0x%llx)", reg_num, reg_offset);
|
||||
s->Printf("DW_OP_breg%i(0x%" PRIx64 ")", reg_num, reg_offset);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -524,11 +524,11 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
|
|||
}
|
||||
}
|
||||
}
|
||||
s->Printf("DW_OP_regx(%llu)", reg_num); break;
|
||||
s->Printf("DW_OP_regx(%" PRIu64 ")", reg_num); break;
|
||||
}
|
||||
break;
|
||||
case DW_OP_fbreg: // 0x91 1 SLEB128 offset
|
||||
s->Printf("DW_OP_fbreg(%lli)",m_data.GetSLEB128(&offset));
|
||||
s->Printf("DW_OP_fbreg(%" PRIi64 ")",m_data.GetSLEB128(&offset));
|
||||
break;
|
||||
case DW_OP_bregx: // 0x92 2 ULEB128 register followed by SLEB128 offset
|
||||
{
|
||||
|
|
@ -541,21 +541,21 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
|
|||
{
|
||||
if (reg_info.name)
|
||||
{
|
||||
s->Printf("[%s%+lli]", reg_info.name, reg_offset);
|
||||
s->Printf("[%s%+" PRIi64 "]", reg_info.name, reg_offset);
|
||||
break;
|
||||
}
|
||||
else if (reg_info.alt_name)
|
||||
{
|
||||
s->Printf("[%s%+lli]", reg_info.alt_name, reg_offset);
|
||||
s->Printf("[%s%+" PRIi64 "]", reg_info.alt_name, reg_offset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
s->Printf("DW_OP_bregx(reg=%u,offset=%lli)", reg_num, reg_offset);
|
||||
s->Printf("DW_OP_bregx(reg=%u,offset=%" PRIi64 ")", reg_num, reg_offset);
|
||||
}
|
||||
break;
|
||||
case DW_OP_piece: // 0x93 1 ULEB128 size of piece addressed
|
||||
s->Printf("DW_OP_piece(0x%llx)", m_data.GetULEB128(&offset));
|
||||
s->Printf("DW_OP_piece(0x%" PRIx64 ")", 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));
|
||||
|
|
@ -572,7 +572,7 @@ DWARFExpression::DumpLocation (Stream *s, uint32_t offset, uint32_t length, lldb
|
|||
s->Printf("DW_OP_call4(0x%8.8x)", m_data.GetU32(&offset));
|
||||
break;
|
||||
case DW_OP_call_ref: // 0x9a DWARF3 1 4- or 8-byte offset of DIE
|
||||
s->Printf("DW_OP_call_ref(0x%8.8llx)", m_data.GetAddress(&offset));
|
||||
s->Printf("DW_OP_call_ref(0x%8.8" PRIx64 ")", m_data.GetAddress(&offset));
|
||||
break;
|
||||
// case DW_OP_form_tls_address: s << "form_tls_address"; break; // 0x9b DWARF3
|
||||
// case DW_OP_call_frame_cfa: s << "call_frame_cfa"; break; // 0x9c DWARF3
|
||||
|
|
@ -582,7 +582,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(%llu)", m_data.GetULEB128(&offset));
|
||||
// s->Printf("DW_OP_APPLE_extern(%" PRIu64 ")", m_data.GetULEB128(&offset));
|
||||
// break;
|
||||
// case DW_OP_APPLE_array_ref:
|
||||
// s->PutCString("DW_OP_APPLE_array_ref");
|
||||
|
|
@ -603,7 +603,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(%llu)", m_data.GetULEB128(&offset));
|
||||
// s->Printf("DW_OP_APPLE_expr_local(%" PRIu64 ")", m_data.GetULEB128(&offset));
|
||||
// break;
|
||||
// case DW_OP_APPLE_constf: // 0xF6 - 1 byte float size, followed by constant float data
|
||||
// {
|
||||
|
|
@ -1345,7 +1345,7 @@ DWARFExpression::Evaluate
|
|||
for (size_t i=0; i<count; ++i)
|
||||
{
|
||||
StreamString new_value;
|
||||
new_value.Printf("[%llu]", (uint64_t)i);
|
||||
new_value.Printf("[%" PRIu64 "]", (uint64_t)i);
|
||||
stack[i].Dump(&new_value);
|
||||
log->Printf(" %s", new_value.GetData());
|
||||
}
|
||||
|
|
@ -1438,7 +1438,7 @@ DWARFExpression::Evaluate
|
|||
else
|
||||
{
|
||||
if (error_ptr)
|
||||
error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%llx for DW_OP_deref: %s\n",
|
||||
error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%" PRIx64 " for DW_OP_deref: %s\n",
|
||||
pointer_addr,
|
||||
error.AsCString());
|
||||
return false;
|
||||
|
|
@ -1536,7 +1536,7 @@ DWARFExpression::Evaluate
|
|||
else
|
||||
{
|
||||
if (error_ptr)
|
||||
error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%llx for DW_OP_deref: %s\n",
|
||||
error_ptr->SetErrorStringWithFormat ("Failed to dereference pointer from 0x%" PRIx64 " for DW_OP_deref: %s\n",
|
||||
pointer_addr,
|
||||
error.AsCString());
|
||||
return false;
|
||||
|
|
@ -2709,7 +2709,7 @@ DWARFExpression::Evaluate
|
|||
if (size && (index >= size || index < 0))
|
||||
{
|
||||
if (error_ptr)
|
||||
error_ptr->SetErrorStringWithFormat("Out of bounds array access. %lld is not in [0, %llu]", index, size);
|
||||
error_ptr->SetErrorStringWithFormat("Out of bounds array access. %" PRId64 " is not in [0, %" PRIu64 "]", index, size);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -2892,7 +2892,7 @@ DWARFExpression::Evaluate
|
|||
new_value))
|
||||
{
|
||||
if (error_ptr)
|
||||
error_ptr->SetErrorStringWithFormat ("Failed to write value to memory at 0x%llx.\n", addr);
|
||||
error_ptr->SetErrorStringWithFormat ("Failed to write value to memory at 0x%" PRIx64 ".\n", addr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -3186,7 +3186,7 @@ DWARFExpression::Evaluate
|
|||
for (size_t i=0; i<count; ++i)
|
||||
{
|
||||
StreamString new_value;
|
||||
new_value.Printf("[%llu]", (uint64_t)i);
|
||||
new_value.Printf("[%" PRIu64 "]", (uint64_t)i);
|
||||
stack[i].Dump(&new_value);
|
||||
log->Printf(" %s", new_value.GetData());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ IRForTarget::GetFunctionAddress (llvm::Function *fun,
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Found \"%s\" at 0x%llx", name.GetCString(), fun_addr);
|
||||
log->Printf("Found \"%s\" at 0x%" PRIx64, name.GetCString(), fun_addr);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -869,7 +869,7 @@ IRForTarget::RewriteObjCConstString (llvm::GlobalVariable *ns_str,
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Found CFStringCreateWithBytes at 0x%llx", CFStringCreateWithBytes_addr);
|
||||
log->Printf("Found CFStringCreateWithBytes at 0x%" PRIx64, CFStringCreateWithBytes_addr);
|
||||
|
||||
// Build the function type:
|
||||
//
|
||||
|
|
@ -1262,7 +1262,7 @@ IRForTarget::RewriteObjCSelector (Instruction* selector_load)
|
|||
return false;
|
||||
|
||||
if (log)
|
||||
log->Printf("Found sel_registerName at 0x%llx", sel_registerName_addr);
|
||||
log->Printf("Found sel_registerName at 0x%" PRIx64, sel_registerName_addr);
|
||||
|
||||
// Build the function type: struct objc_selector *sel_registerName(uint8_t*)
|
||||
|
||||
|
|
@ -1678,7 +1678,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 %lu, align %lld]",
|
||||
log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %lu, align %" PRId64 "]",
|
||||
name.c_str(),
|
||||
qual_type.getAsString().c_str(),
|
||||
PrintType(value_type).c_str(),
|
||||
|
|
@ -1728,7 +1728,7 @@ IRForTarget::HandleSymbol (Value *symbol)
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Found \"%s\" at 0x%llx", name.GetCString(), symbol_addr);
|
||||
log->Printf("Found \"%s\" at 0x%" PRIx64, name.GetCString(), symbol_addr);
|
||||
|
||||
Type *symbol_type = symbol->getType();
|
||||
IntegerType *intptr_ty = Type::getIntNTy(m_module->getContext(),
|
||||
|
|
@ -2529,7 +2529,7 @@ IRForTarget::ReplaceVariables (Function &llvm_function)
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf(" \"%s\" (\"%s\") placed at %lld",
|
||||
log->Printf(" \"%s\" (\"%s\") placed at %" PRId64,
|
||||
name.GetCString(),
|
||||
decl->getNameAsString().c_str(),
|
||||
offset);
|
||||
|
|
@ -2573,7 +2573,7 @@ IRForTarget::ReplaceVariables (Function &llvm_function)
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Total structure [align %lld, size %lu]", alignment, size);
|
||||
log->Printf("Total structure [align %" PRId64 ", size %lu]", alignment, size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ public:
|
|||
|
||||
lldb_private::Value base = GetAccessTarget(region.m_base);
|
||||
|
||||
ss.Printf("%llx [%s - %s %llx]",
|
||||
ss.Printf("%" PRIx64 " [%s - %s %llx]",
|
||||
region.m_base,
|
||||
lldb_private::Value::GetValueTypeAsCString(base.GetValueType()),
|
||||
lldb_private::Value::GetContextTypeAsCString(base.GetContextType()),
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ RecordingMemoryManager::allocateSpace(intptr_t Size, unsigned Alignment)
|
|||
|
||||
if (m_log)
|
||||
{
|
||||
m_log->Printf("RecordingMemoryManager::allocateSpace(Size=%llu, Alignment=%u) = %p",
|
||||
m_log->Printf("RecordingMemoryManager::allocateSpace(Size=%" PRIu64 ", Alignment=%u) = %p",
|
||||
(uint64_t)Size, Alignment, return_value);
|
||||
allocation.dump(m_log);
|
||||
}
|
||||
|
|
@ -113,7 +113,7 @@ RecordingMemoryManager::allocateCodeSection(uintptr_t Size, unsigned Alignment,
|
|||
|
||||
if (m_log)
|
||||
{
|
||||
m_log->Printf("RecordingMemoryManager::allocateCodeSection(Size=0x%llx, Alignment=%u, SectionID=%u) = %p",
|
||||
m_log->Printf("RecordingMemoryManager::allocateCodeSection(Size=0x%" PRIx64 ", Alignment=%u, SectionID=%u) = %p",
|
||||
(uint64_t)Size, Alignment, SectionID, return_value);
|
||||
allocation.dump(m_log);
|
||||
}
|
||||
|
|
@ -136,7 +136,7 @@ RecordingMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignment,
|
|||
|
||||
if (m_log)
|
||||
{
|
||||
m_log->Printf("RecordingMemoryManager::allocateDataSection(Size=0x%llx, Alignment=%u, SectionID=%u) = %p",
|
||||
m_log->Printf("RecordingMemoryManager::allocateDataSection(Size=0x%" PRIx64 ", Alignment=%u, SectionID=%u) = %p",
|
||||
(uint64_t)Size, Alignment, SectionID, return_value);
|
||||
allocation.dump(m_log);
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ RecordingMemoryManager::allocateGlobal(uintptr_t Size, unsigned Alignment)
|
|||
|
||||
if (m_log)
|
||||
{
|
||||
m_log->Printf("RecordingMemoryManager::allocateGlobal(Size=0x%llx, Alignment=%u) = %p",
|
||||
m_log->Printf("RecordingMemoryManager::allocateGlobal(Size=0x%" PRIx64 ", Alignment=%u) = %p",
|
||||
(uint64_t)Size, Alignment, return_value);
|
||||
allocation.dump(m_log);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ Host::StartMonitoringChildProcess
|
|||
info_ptr->monitor_signals = monitor_signals;
|
||||
|
||||
char thread_name[256];
|
||||
::snprintf (thread_name, sizeof(thread_name), "<lldb.host.wait4(pid=%i)>", pid);
|
||||
::snprintf (thread_name, sizeof(thread_name), "<lldb.host.wait4(pid=%" PRIu64 ")>", pid);
|
||||
thread = ThreadCreate (thread_name,
|
||||
MonitorChildProcessThreadFunction,
|
||||
info_ptr,
|
||||
|
|
@ -149,7 +149,7 @@ MonitorChildProcessThreadFunction (void *arg)
|
|||
{
|
||||
log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
|
||||
if (log)
|
||||
log->Printf("%s ::wait_pid (pid = %i, &status, options = %i)...", function, pid, options);
|
||||
log->Printf("%s ::wait_pid (pid = %" PRIu64 ", &status, options = %i)...", function, pid, options);
|
||||
|
||||
// Wait for all child processes
|
||||
::pthread_testcancel ();
|
||||
|
|
@ -198,7 +198,7 @@ MonitorChildProcessThreadFunction (void *arg)
|
|||
|
||||
log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS);
|
||||
if (log)
|
||||
log->Printf ("%s ::waitpid (pid = %i, &status, options = %i) => pid = %i, status = 0x%8.8x (%s), signal = %i, exit_state = %i",
|
||||
log->Printf ("%s ::waitpid (pid = %" PRIu64 ", &status, options = %i) => pid = %" PRIu64 ", status = 0x%8.8x (%s), signal = %i, exit_state = %i",
|
||||
function,
|
||||
wait_pid,
|
||||
options,
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ Mutex::GetMutex()
|
|||
int
|
||||
Mutex::Lock()
|
||||
{
|
||||
DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_lock (%p)...\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex);
|
||||
DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_lock (%p)...\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex);
|
||||
|
||||
#if ENABLE_MUTEX_ERROR_CHECKING
|
||||
error_check_mutex (&m_mutex, eMutexActionAssertInitialized);
|
||||
|
|
@ -291,7 +291,7 @@ Mutex::Lock()
|
|||
assert(err == 0);
|
||||
}
|
||||
#endif
|
||||
DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_lock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
|
||||
DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_lock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -311,7 +311,7 @@ Mutex::TryLock(const char *failure_message)
|
|||
#endif
|
||||
|
||||
int err = ::pthread_mutex_trylock (&m_mutex);
|
||||
DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_trylock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
|
||||
DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_trylock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -340,7 +340,7 @@ Mutex::Unlock()
|
|||
assert(err == 0);
|
||||
}
|
||||
#endif
|
||||
DEBUG_LOG ("[%4.4llx/%4.4llx] pthread_mutex_unlock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
|
||||
DEBUG_LOG ("[%4.4" PRIx64 "/%4.4" PRIx64 "] pthread_mutex_unlock (%p) => %i\n", Host::GetCurrentProcessID(), Host::GetCurrentThreadID(), &m_mutex, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Host::GetAuxvData(lldb_private::Process *process)
|
|||
// dynamically generated by the kernel) which is incompatible with the
|
||||
// current ReadFileContents implementation. Therefore we simply stream the
|
||||
// data into a DataBuffer ourselves.
|
||||
if (snprintf(path, path_size, "/proc/%d/auxv", process->GetID()) < 0)
|
||||
if (snprintf(path, path_size, "/proc/%" PRIu64 "/auxv", process->GetID()) < 0)
|
||||
return buf_sp;
|
||||
|
||||
if ((fd = open(path, O_RDONLY, 0)) < 0)
|
||||
|
|
|
|||
|
|
@ -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 %llu", idx, (uint64_t)(array_count - 1));
|
||||
error.SetErrorStringWithFormat("index %i out of range, valid values are 0 through %" PRIu64, idx, (uint64_t)(array_count - 1));
|
||||
else
|
||||
error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%llu", idx, (uint64_t)array_count);
|
||||
error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%" PRIu64, idx, (uint64_t)array_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ OptionValueEnumeration::DumpValue (const ExecutionContext *exe_ctx, Stream &strm
|
|||
return;
|
||||
}
|
||||
}
|
||||
strm.Printf("%llu", (uint64_t)m_current_value);
|
||||
strm.Printf("%" PRIu64, (uint64_t)m_current_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ using namespace lldb_private;
|
|||
void
|
||||
OptionValueSInt64::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask)
|
||||
{
|
||||
//printf ("%p: DumpValue (exe_ctx=%p, strm, mask) m_current_value = %lli\n", this, exe_ctx, m_current_value);
|
||||
//printf ("%p: DumpValue (exe_ctx=%p, strm, mask) m_current_value = %" PRIi64 "\n", this, exe_ctx, m_current_value);
|
||||
if (dump_mask & eDumpOptionType)
|
||||
strm.Printf ("(%s)", GetTypeAsCString ());
|
||||
// if (dump_mask & eDumpOptionName)
|
||||
|
|
@ -31,7 +31,7 @@ OptionValueSInt64::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uin
|
|||
{
|
||||
if (dump_mask & eDumpOptionType)
|
||||
strm.PutCString (" = ");
|
||||
strm.Printf ("%lli", m_current_value);
|
||||
strm.Printf ("%" PRIi64, m_current_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ OptionValueSInt64::SetValueFromCString (const char *value_cstr, VarSetOperationT
|
|||
m_current_value = value;
|
||||
}
|
||||
else
|
||||
error.SetErrorStringWithFormat ("%lli is out of range, valid values must be between %lli and %lli.",
|
||||
error.SetErrorStringWithFormat ("%" PRIi64 " is out of range, valid values must be between %" PRIi64 " and %" PRIi64 ".",
|
||||
value,
|
||||
m_min_value,
|
||||
m_max_value);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ OptionValueUInt64::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uin
|
|||
{
|
||||
if (dump_mask & eDumpOptionType)
|
||||
strm.PutCString (" = ");
|
||||
strm.Printf ("%llu", m_current_value);
|
||||
strm.Printf ("%" PRIu64, m_current_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ ScriptInterpreterPython::PythonInputReaderManager::InputReaderCallback
|
|||
if (IS_VALID_LLDB_HOST_THREAD(embedded_interpreter_thread))
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", embedded_interpreter_thread);
|
||||
log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", (void *)embedded_interpreter_thread);
|
||||
Error detach_error;
|
||||
Host::ThreadDetach (embedded_interpreter_thread, &detach_error);
|
||||
}
|
||||
|
|
@ -493,7 +493,7 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete
|
|||
Debugger::Terminate();
|
||||
|
||||
run_string.Clear();
|
||||
run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %llu; pydoc.pager = pydoc.plainpager')", m_dictionary_name.c_str(),
|
||||
run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %" PRIu64 "; pydoc.pager = pydoc.plainpager')", m_dictionary_name.c_str(),
|
||||
interpreter.GetDebugger().GetID());
|
||||
PyRun_SimpleString (run_string.GetData());
|
||||
|
||||
|
|
@ -614,8 +614,8 @@ ScriptInterpreterPython::EnterSession ()
|
|||
|
||||
StreamString run_string;
|
||||
|
||||
run_string.Printf ( "run_one_line (%s, 'lldb.debugger_unique_id = %llu", m_dictionary_name.c_str(), GetCommandInterpreter().GetDebugger().GetID());
|
||||
run_string.Printf ( "; lldb.debugger = lldb.SBDebugger.FindDebuggerWithID (%llu)", GetCommandInterpreter().GetDebugger().GetID());
|
||||
run_string.Printf ( "run_one_line (%s, 'lldb.debugger_unique_id = %" PRIu64, m_dictionary_name.c_str(), GetCommandInterpreter().GetDebugger().GetID());
|
||||
run_string.Printf ( "; lldb.debugger = lldb.SBDebugger.FindDebuggerWithID (%" PRIu64 ")", GetCommandInterpreter().GetDebugger().GetID());
|
||||
run_string.PutCString ("; lldb.target = lldb.debugger.GetSelectedTarget()");
|
||||
run_string.PutCString ("; lldb.process = lldb.target.GetProcess()");
|
||||
run_string.PutCString ("; lldb.thread = lldb.process.GetSelectedThread ()");
|
||||
|
|
@ -859,7 +859,7 @@ ScriptInterpreterPython::InputReaderCallback
|
|||
if (IS_VALID_LLDB_HOST_THREAD(embedded_interpreter_thread))
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("ScriptInterpreterPython::InputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", embedded_interpreter_thread);
|
||||
log->Printf ("ScriptInterpreterPython::InputReaderCallback, Activate, succeeded in creating thread (thread_t = %p)", (void *)embedded_interpreter_thread);
|
||||
Error detach_error;
|
||||
Host::ThreadDetach (embedded_interpreter_thread, &detach_error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
|
||||
|
||||
if (log)
|
||||
log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%llx\n func_addr = 0x%llx\n return_addr = 0x%llx\n arg1_ptr = %p (0x%llx)\n arg2_ptr = %p (0x%llx)\n arg3_ptr = %p (0x%llx)\n)",
|
||||
log->Printf("ABISysV_x86_64::PrepareTrivialCall\n(\n thread = %p\n sp = 0x%" PRIx64 "\n func_addr = 0x%" PRIx64 "\n return_addr = 0x%" PRIx64 "\n arg1_ptr = %p (0x%" PRIx64 ")\n arg2_ptr = %p (0x%" PRIx64 ")\n arg3_ptr = %p (0x%" PRIx64 ")\n)",
|
||||
(void*)&thread,
|
||||
(uint64_t)sp,
|
||||
(uint64_t)func_addr,
|
||||
|
|
@ -336,7 +336,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
{
|
||||
reg_info = reg_ctx->GetRegisterInfoByName("rdi", 0);
|
||||
if (log)
|
||||
log->Printf("About to write arg1 (0x%llx) into %s", (uint64_t)*arg1_ptr, reg_info->name);
|
||||
log->Printf("About to write arg1 (0x%" PRIx64 ") into %s", (uint64_t)*arg1_ptr, reg_info->name);
|
||||
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg1_ptr))
|
||||
return false;
|
||||
|
|
@ -345,7 +345,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
{
|
||||
reg_info = reg_ctx->GetRegisterInfoByName("rsi", 0);
|
||||
if (log)
|
||||
log->Printf("About to write arg2 (0x%llx) into %s", (uint64_t)*arg2_ptr, reg_info->name);
|
||||
log->Printf("About to write arg2 (0x%" PRIx64 ") into %s", (uint64_t)*arg2_ptr, reg_info->name);
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg2_ptr))
|
||||
return false;
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
{
|
||||
reg_info = reg_ctx->GetRegisterInfoByName("rdx", 0);
|
||||
if (log)
|
||||
log->Printf("About to write arg3 (0x%llx) into %s", (uint64_t)*arg3_ptr, reg_info->name);
|
||||
log->Printf("About to write arg3 (0x%" PRIx64 ") into %s", (uint64_t)*arg3_ptr, reg_info->name);
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg3_ptr))
|
||||
return false;
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
{
|
||||
reg_info = reg_ctx->GetRegisterInfoByName("rcx", 0);
|
||||
if (log)
|
||||
log->Printf("About to write arg4 (0x%llx) into %s", (uint64_t)*arg4_ptr, reg_info->name);
|
||||
log->Printf("About to write arg4 (0x%" PRIx64 ") into %s", (uint64_t)*arg4_ptr, reg_info->name);
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg4_ptr))
|
||||
return false;
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
{
|
||||
reg_info = reg_ctx->GetRegisterInfoByName("r8", 0);
|
||||
if (log)
|
||||
log->Printf("About to write arg5 (0x%llx) into %s", (uint64_t)*arg5_ptr, reg_info->name);
|
||||
log->Printf("About to write arg5 (0x%" PRIx64 ") into %s", (uint64_t)*arg5_ptr, reg_info->name);
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg5_ptr))
|
||||
return false;
|
||||
|
||||
|
|
@ -377,7 +377,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
{
|
||||
reg_info = reg_ctx->GetRegisterInfoByName("r9", 0);
|
||||
if (log)
|
||||
log->Printf("About to write arg6 (0x%llx) into %s", (uint64_t)*arg6_ptr, reg_info->name);
|
||||
log->Printf("About to write arg6 (0x%" PRIx64 ") into %s", (uint64_t)*arg6_ptr, reg_info->name);
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (reg_info, *arg6_ptr))
|
||||
return false;
|
||||
}
|
||||
|
|
@ -391,7 +391,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
// First, align the SP
|
||||
|
||||
if (log)
|
||||
log->Printf("16-byte aligning SP: 0x%llx to 0x%llx", (uint64_t)sp, (uint64_t)(sp & ~0xfull));
|
||||
log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64, (uint64_t)sp, (uint64_t)(sp & ~0xfull));
|
||||
|
||||
sp &= ~(0xfull); // 16-byte alignment
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
reg_value.SetUInt64 (return_addr);
|
||||
|
||||
if (log)
|
||||
log->Printf("Pushing the return address onto the stack: new SP 0x%llx, return address 0x%llx", (uint64_t)sp, (uint64_t)return_addr);
|
||||
log->Printf("Pushing the return address onto the stack: new SP 0x%" PRIx64 ", return address 0x%" PRIx64, (uint64_t)sp, (uint64_t)return_addr);
|
||||
|
||||
const RegisterInfo *pc_reg_info = reg_ctx->GetRegisterInfoByName("rip");
|
||||
Error error (reg_ctx->WriteRegisterValueToMemory(pc_reg_info, sp, pc_reg_info->byte_size, reg_value));
|
||||
|
|
@ -412,7 +412,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
// %rsp is set to the actual stack value.
|
||||
|
||||
if (log)
|
||||
log->Printf("Writing SP (0x%llx) down", (uint64_t)sp);
|
||||
log->Printf("Writing SP (0x%" PRIx64 ") down", (uint64_t)sp);
|
||||
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (reg_ctx->GetRegisterInfoByName("rsp"), sp))
|
||||
return false;
|
||||
|
|
@ -420,7 +420,7 @@ ABISysV_x86_64::PrepareTrivialCall (Thread &thread,
|
|||
// %rip is set to the address of the called function.
|
||||
|
||||
if (log)
|
||||
log->Printf("Writing new IP (0x%llx) down", (uint64_t)func_addr);
|
||||
log->Printf("Writing new IP (0x%" PRIx64 ") down", (uint64_t)func_addr);
|
||||
|
||||
if (!reg_ctx->WriteRegisterFromUnsigned (pc_reg_info, func_addr))
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex
|
|||
|
||||
if (!EDEvaluateOperand(&operand_value, operand, IPRegisterReader, &rra))
|
||||
{
|
||||
comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value);
|
||||
comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value);
|
||||
AddSymbolicInfo (exe_ctx, comment, operand_value, GetAddress());
|
||||
}
|
||||
}
|
||||
|
|
@ -257,7 +257,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex
|
|||
{
|
||||
uint64_t operand_value = PC + atoi(++pos);
|
||||
// Put the address value into the operands.
|
||||
comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value);
|
||||
comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value);
|
||||
AddSymbolicInfo (exe_ctx, comment, operand_value, GetAddress());
|
||||
}
|
||||
}
|
||||
|
|
@ -278,7 +278,7 @@ InstructionLLVM::CalculateMnemonicOperandsAndComment (const ExecutionContext* ex
|
|||
}
|
||||
uint64_t operand_value = PC + atoi(++pos);
|
||||
// Put the address value into the comment.
|
||||
comment.Printf("0x%*.*llx ", addr_nibble_size, addr_nibble_size, operand_value);
|
||||
comment.Printf("0x%*.*" PRIx64 " ", addr_nibble_size, addr_nibble_size, operand_value);
|
||||
// And the original token string into the operands.
|
||||
// llvm::StringRef Str(pos - 1);
|
||||
// RStrip(Str, '\n');
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ public:
|
|||
const uint64_t uval64 = data.GetU64(&offset);
|
||||
m_opcode.SetOpcode64(uval64);
|
||||
m_opcode_name.assign (".quad");
|
||||
mnemonic_strm.Printf("0x%16.16llx", uval64);
|
||||
mnemonic_strm.Printf("0x%16.16" PRIx64, uval64);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -644,7 +644,7 @@ const char *DisassemblerLLVMC::SymbolLookup (uint64_t value,
|
|||
m_inst->AppendComment(ss.GetString());
|
||||
}
|
||||
}
|
||||
//printf ("DisassemblerLLVMC::SymbolLookup (value=0x%16.16llx, type=%llu, pc=0x%16.16llx, name=\"%s\") m_exe_ctx=%p, m_inst=%p\n", value, *type_ptr, pc, remove_this_prior_to_checkin.c_str(), m_exe_ctx, m_inst);
|
||||
//printf ("DisassemblerLLVMC::SymbolLookup (value=0x%16.16" PRIx64 ", type=%" PRIu64 ", pc=0x%16.16" PRIx64 ", name=\"%s\") m_exe_ctx=%p, m_inst=%p\n", value, *type_ptr, pc, remove_this_prior_to_checkin.c_str(), m_exe_ctx, m_inst);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule (
|
|||
{
|
||||
char uuidbuf[64];
|
||||
s->Printf ("Kernel UUID: %s\n", module_sp->GetUUID().GetAsCString(uuidbuf, sizeof (uuidbuf)));
|
||||
s->Printf ("Load Address: 0x%llx\n", address);
|
||||
s->Printf ("Load Address: 0x%" PRIx64 "\n", address);
|
||||
if (module_sp->GetFileSpec().GetDirectory().IsEmpty())
|
||||
{
|
||||
s->Printf ("Loaded kernel file %s\n", module_sp->GetFileSpec().GetFilename().AsCString());
|
||||
|
|
@ -723,7 +723,7 @@ DynamicLoaderDarwinKernel::ReadKextSummaries (const Address &kext_summary_addr,
|
|||
{
|
||||
image_infos[i].reference_list = 0;
|
||||
}
|
||||
// printf ("[%3u] %*.*s: address=0x%16.16llx, size=0x%16.16llx, version=0x%16.16llx, load_tag=0x%8.8x, flags=0x%8.8x\n",
|
||||
// printf ("[%3u] %*.*s: address=0x%16.16" PRIx64 ", size=0x%16.16" PRIx64 ", version=0x%16.16" PRIx64 ", load_tag=0x%8.8x, flags=0x%8.8x\n",
|
||||
// i,
|
||||
// KERNEL_MODULE_MAX_NAME, KERNEL_MODULE_MAX_NAME, (char *)name_data,
|
||||
// image_infos[i].address,
|
||||
|
|
@ -793,7 +793,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::PutToLog (Log *log) const
|
|||
{
|
||||
if (u)
|
||||
{
|
||||
log->Printf("\taddr=0x%16.16llx size=0x%16.16llx version=0x%16.16llx load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\"",
|
||||
log->Printf("\taddr=0x%16.16" PRIx64 " size=0x%16.16" PRIx64 " version=0x%16.16" PRIx64 " load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\"",
|
||||
address, size, version, load_tag, flags, reference_list,
|
||||
u[ 0], u[ 1], u[ 2], u[ 3], u[ 4], u[ 5], u[ 6], u[ 7],
|
||||
u[ 8], u[ 9], u[10], u[11], u[12], u[13], u[14], u[15],
|
||||
|
|
@ -801,7 +801,7 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::PutToLog (Log *log) const
|
|||
}
|
||||
else
|
||||
{
|
||||
log->Printf("\t[0x%16.16llx - 0x%16.16llx) version=0x%16.16llx load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16llx name=\"%s\"",
|
||||
log->Printf("\t[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ") version=0x%16.16" PRIx64 " load-tag=0x%8.8x flags=0x%8.8x ref-list=0x%16.16" PRIx64 " name=\"%s\"",
|
||||
address, address+size, version, load_tag, flags, reference_list,
|
||||
name);
|
||||
}
|
||||
|
|
@ -819,7 +819,7 @@ DynamicLoaderDarwinKernel::PutToLog(Log *log) const
|
|||
return;
|
||||
|
||||
Mutex::Locker locker(m_mutex);
|
||||
log->Printf("gLoadedKextSummaries = 0x%16.16llx { version=%u, entry_size=%u, entry_count=%u }",
|
||||
log->Printf("gLoadedKextSummaries = 0x%16.16" PRIx64 " { version=%u, entry_size=%u, entry_count=%u }",
|
||||
m_kext_summary_header_addr.GetFileAddress(),
|
||||
m_kext_summary_header.version,
|
||||
m_kext_summary_header.entry_size,
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ DynamicLoaderMacOSXDYLD::UpdateImageLoadAddress (Module *module, DYLDImageInfo&
|
|||
else
|
||||
{
|
||||
Host::SystemLog (Host::eSystemLogWarning,
|
||||
"warning: unable to find and load segment named '%s' at 0x%llx in '%s/%s' in macosx dynamic loader plug-in.\n",
|
||||
"warning: unable to find and load segment named '%s' at 0x%" PRIx64 " in '%s/%s' in macosx dynamic loader plug-in.\n",
|
||||
info.segments[i].name.AsCString("<invalid>"),
|
||||
(uint64_t)new_section_load_addr,
|
||||
image_object_file->GetFileSpec().GetDirectory().AsCString(),
|
||||
|
|
@ -795,7 +795,7 @@ DynamicLoaderMacOSXDYLD::AddModulesUsingImageInfos (DYLDImageInfo::collection &i
|
|||
{
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("Adding new image at address=0x%16.16llx.", image_infos[idx].address);
|
||||
log->Printf ("Adding new image at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
|
||||
image_infos[idx].PutToLog (log.get());
|
||||
}
|
||||
|
||||
|
|
@ -907,7 +907,7 @@ DynamicLoaderMacOSXDYLD::RemoveModulesUsingImageInfosAddress (lldb::addr_t image
|
|||
{
|
||||
if (log)
|
||||
{
|
||||
log->Printf ("Removing module at address=0x%16.16llx.", image_infos[idx].address);
|
||||
log->Printf ("Removing module at address=0x%16.16" PRIx64 ".", image_infos[idx].address);
|
||||
image_infos[idx].PutToLog (log.get());
|
||||
}
|
||||
|
||||
|
|
@ -1376,12 +1376,12 @@ DynamicLoaderMacOSXDYLD::Segment::PutToLog (Log *log, lldb::addr_t slide) const
|
|||
if (log)
|
||||
{
|
||||
if (slide == 0)
|
||||
log->Printf ("\t\t%16s [0x%16.16llx - 0x%16.16llx)",
|
||||
log->Printf ("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")",
|
||||
name.AsCString(""),
|
||||
vmaddr + slide,
|
||||
vmaddr + slide + vmsize);
|
||||
else
|
||||
log->Printf ("\t\t%16s [0x%16.16llx - 0x%16.16llx) slide = 0x%llx",
|
||||
log->Printf ("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ") slide = 0x%" PRIx64,
|
||||
name.AsCString(""),
|
||||
vmaddr + slide,
|
||||
vmaddr + slide + vmsize,
|
||||
|
|
@ -1416,7 +1416,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
|
|||
{
|
||||
if (u)
|
||||
{
|
||||
log->Printf("\t modtime=0x%8.8llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s' (UNLOADED)",
|
||||
log->Printf("\t modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s' (UNLOADED)",
|
||||
mod_date,
|
||||
u[ 0], u[ 1], u[ 2], u[ 3],
|
||||
u[ 4], u[ 5], u[ 6], u[ 7],
|
||||
|
|
@ -1426,7 +1426,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
|
|||
file_spec.GetFilename().AsCString());
|
||||
}
|
||||
else
|
||||
log->Printf("\t modtime=0x%8.8llx path='%s/%s' (UNLOADED)",
|
||||
log->Printf("\t modtime=0x%8.8" PRIx64 " path='%s/%s' (UNLOADED)",
|
||||
mod_date,
|
||||
file_spec.GetDirectory().AsCString(),
|
||||
file_spec.GetFilename().AsCString());
|
||||
|
|
@ -1435,7 +1435,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
|
|||
{
|
||||
if (u)
|
||||
{
|
||||
log->Printf("\taddress=0x%16.16llx modtime=0x%8.8llx uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s'",
|
||||
log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s'",
|
||||
address,
|
||||
mod_date,
|
||||
u[ 0], u[ 1], u[ 2], u[ 3],
|
||||
|
|
@ -1447,7 +1447,7 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
|
|||
}
|
||||
else
|
||||
{
|
||||
log->Printf("\taddress=0x%16.16llx modtime=0x%8.8llx path='%s/%s'",
|
||||
log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " path='%s/%s'",
|
||||
address,
|
||||
mod_date,
|
||||
file_spec.GetDirectory().AsCString(),
|
||||
|
|
@ -1470,7 +1470,7 @@ DynamicLoaderMacOSXDYLD::PutToLog(Log *log) const
|
|||
return;
|
||||
|
||||
Mutex::Locker locker(m_mutex);
|
||||
log->Printf("dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8llx, notify=0x%8.8llx }",
|
||||
log->Printf("dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8" PRIx64 ", notify=0x%8.8" PRIx64 " }",
|
||||
m_dyld_all_image_infos.version,
|
||||
m_dyld_all_image_infos.dylib_info_count,
|
||||
(uint64_t)m_dyld_all_image_infos.dylib_info_addr,
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ AuxVector::DumpToLog(LogSP log) const
|
|||
log->PutCString("AuxVector: ");
|
||||
for (iterator I = begin(); I != end(); ++I)
|
||||
{
|
||||
log->Printf(" %s [%llu]: %llx", GetEntryName(*I), I->type, I->value);
|
||||
log->Printf(" %s [%" PRIu64 "]: %" PRIx64, GetEntryName(*I), I->type, I->value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -303,11 +303,11 @@ DYLDRendezvous::DumpToLog(LogSP log) const
|
|||
return;
|
||||
|
||||
log->PutCString("DYLDRendezvous:");
|
||||
log->Printf(" Address: %llx", GetRendezvousAddress());
|
||||
log->Printf(" Address: %" PRIx64, GetRendezvousAddress());
|
||||
log->Printf(" Version: %d", GetVersion());
|
||||
log->Printf(" Link : %llx", GetLinkMapAddress());
|
||||
log->Printf(" Break : %llx", GetBreakAddress());
|
||||
log->Printf(" LDBase : %llx", GetLDBase());
|
||||
log->Printf(" Link : %" PRIx64, GetLinkMapAddress());
|
||||
log->Printf(" Break : %" PRIx64, GetBreakAddress());
|
||||
log->Printf(" LDBase : %" PRIx64, GetLDBase());
|
||||
log->Printf(" State : %s",
|
||||
(state == eConsistent) ? "consistent" :
|
||||
(state == eAdd) ? "add" :
|
||||
|
|
@ -322,10 +322,10 @@ DYLDRendezvous::DumpToLog(LogSP log) const
|
|||
for (int i = 1; I != E; ++I, ++i)
|
||||
{
|
||||
log->Printf("\n SOEntry [%d] %s", i, I->path.c_str());
|
||||
log->Printf(" Base : %llx", I->base_addr);
|
||||
log->Printf(" Path : %llx", I->path_addr);
|
||||
log->Printf(" Dyn : %llx", I->dyn_addr);
|
||||
log->Printf(" Next : %llx", I->next);
|
||||
log->Printf(" Prev : %llx", I->prev);
|
||||
log->Printf(" Base : %" PRIx64, I->base_addr);
|
||||
log->Printf(" Path : %" PRIx64, I->path_addr);
|
||||
log->Printf(" Dyn : %" PRIx64, I->dyn_addr);
|
||||
log->Printf(" Next : %" PRIx64, I->next);
|
||||
log->Printf(" Prev : %" PRIx64, I->prev);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
|
|||
{
|
||||
LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
|
||||
if (log)
|
||||
log->Printf ("0x%16.16llx: static-type = '%s' has vtable symbol '%s'\n",
|
||||
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has vtable symbol '%s'\n",
|
||||
original_ptr,
|
||||
in_value.GetTypeName().GetCString(),
|
||||
name);
|
||||
|
|
@ -149,14 +149,14 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
|
|||
if (num_matches == 0)
|
||||
{
|
||||
if (log)
|
||||
log->Printf("0x%16.16llx: is not dynamic\n", original_ptr);
|
||||
log->Printf("0x%16.16" PRIx64 ": is not dynamic\n", original_ptr);
|
||||
return false;
|
||||
}
|
||||
if (num_matches == 1)
|
||||
{
|
||||
type_sp = class_types.GetTypeAtIndex(0);
|
||||
if (log)
|
||||
log->Printf ("0x%16.16llx: static-type = '%s' has dynamic type: uid={0x%llx}, type-name='%s'\n",
|
||||
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has dynamic type: uid={0x%" PRIx64 "}, type-name='%s'\n",
|
||||
original_ptr,
|
||||
in_value.GetTypeName().AsCString(),
|
||||
type_sp->GetID(),
|
||||
|
|
@ -175,7 +175,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
|
|||
if (type_sp)
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types: uid={0x%llx}, type-name='%s'\n",
|
||||
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types: uid={0x%" PRIx64 "}, type-name='%s'\n",
|
||||
original_ptr,
|
||||
in_value.GetTypeName().AsCString(),
|
||||
type_sp->GetID(),
|
||||
|
|
@ -192,7 +192,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
|
|||
if (ClangASTContext::IsCXXClassType(type_sp->GetClangFullType()))
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types, picking this one: uid={0x%llx}, type-name='%s'\n",
|
||||
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types, picking this one: uid={0x%" PRIx64 "}, type-name='%s'\n",
|
||||
original_ptr,
|
||||
in_value.GetTypeName().AsCString(),
|
||||
type_sp->GetID(),
|
||||
|
|
@ -206,7 +206,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
|
|||
if (i == num_matches)
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("0x%16.16llx: static-type = '%s' has multiple matching dynamic types, didn't find a C++ match\n",
|
||||
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types, didn't find a C++ match\n",
|
||||
original_ptr,
|
||||
in_value.GetTypeName().AsCString());
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded()
|
|||
ClassDescriptorSP descriptor_sp (new ClassDescriptorV1(isa, process_sp));
|
||||
|
||||
if (log && log->GetVerbose())
|
||||
log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%llx from _objc_debug_class_hash to isa->descriptor cache", isa);
|
||||
log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64 " from _objc_debug_class_hash to isa->descriptor cache", isa);
|
||||
|
||||
m_isa_to_descriptor_cache[isa] = descriptor_sp;
|
||||
}
|
||||
|
|
@ -435,7 +435,7 @@ AppleObjCRuntimeV1::UpdateISAToDescriptorMapIfNeeded()
|
|||
ClassDescriptorSP descriptor_sp (new ClassDescriptorV1(isa, process_sp));
|
||||
|
||||
if (log && log->GetVerbose())
|
||||
log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%llx from _objc_debug_class_hash to isa->descriptor cache", isa);
|
||||
log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64 " from _objc_debug_class_hash to isa->descriptor cache", isa);
|
||||
|
||||
m_isa_to_descriptor_cache[isa] = descriptor_sp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1800,7 +1800,7 @@ AppleObjCRuntimeV2::GetClassDescriptor (ValueObject& valobj)
|
|||
{
|
||||
lldb::LogSP log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
|
||||
if (log)
|
||||
log->Printf("0x%llx: AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%llx",
|
||||
log->Printf("0x%" PRIx64 ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was not in class descriptor cache 0x%" PRIx64,
|
||||
isa_pointer,
|
||||
isa);
|
||||
}
|
||||
|
|
@ -1875,7 +1875,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded()
|
|||
ClassDescriptorSP descriptor_sp = ClassDescriptorSP(new ClassDescriptorV2(*this, elt.second));
|
||||
|
||||
if (log && log->GetVerbose())
|
||||
log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%llx (%s) from dynamic table to isa->descriptor cache", elt.second, elt.first.AsCString());
|
||||
log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64 " (%s) from dynamic table to isa->descriptor cache", elt.second, elt.first.AsCString());
|
||||
|
||||
m_isa_to_descriptor_cache[elt.second] = descriptor_sp;
|
||||
}
|
||||
|
|
@ -1915,7 +1915,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded()
|
|||
ClassDescriptorSP descriptor_sp = ClassDescriptorSP(new ClassDescriptorV2(*this, objc_isa));
|
||||
|
||||
if (log && log->GetVerbose())
|
||||
log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%llx (%s) from static table to isa->descriptor cache", objc_isa, descriptor_sp->GetClassName().AsCString());
|
||||
log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64 " (%s) from static table to isa->descriptor cache", objc_isa, descriptor_sp->GetClassName().AsCString());
|
||||
|
||||
m_isa_to_descriptor_cache[objc_isa] = descriptor_sp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,13 +301,13 @@ AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::AddressInRegion (lld
|
|||
void
|
||||
AppleObjCTrampolineHandler::AppleObjCVTables::VTableRegion::Dump (Stream &s)
|
||||
{
|
||||
s.Printf ("Header addr: 0x%llx Code start: 0x%llx Code End: 0x%llx Next: 0x%llx\n",
|
||||
s.Printf ("Header addr: 0x%" PRIx64 " Code start: 0x%" PRIx64 " Code End: 0x%" PRIx64 " Next: 0x%" PRIx64 "\n",
|
||||
m_header_addr, m_code_start_addr, m_code_end_addr, m_next_region);
|
||||
size_t num_elements = m_descriptors.size();
|
||||
for (size_t i = 0; i < num_elements; i++)
|
||||
{
|
||||
s.Indent();
|
||||
s.Printf ("Code start: 0x%llx Flags: %d\n", m_descriptors[i].code_start, m_descriptors[i].flags);
|
||||
s.Printf ("Code start: 0x%" PRIx64 " Flags: %d\n", m_descriptors[i].code_start, m_descriptors[i].flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -616,7 +616,7 @@ AppleObjCTrampolineHandler::SetupDispatchFunction (Thread &thread, ValueList &di
|
|||
impl_code_address = sc.symbol->GetAddress();
|
||||
|
||||
//lldb::addr_t addr = impl_code_address.GetOpcodeLoadAddress (exe_ctx.GetTargetPtr());
|
||||
//printf ("Getting address for our_utility_function: 0x%llx.\n", addr);
|
||||
//printf ("Getting address for our_utility_function: 0x%" PRIx64 ".\n", addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -882,7 +882,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
|
|||
{
|
||||
if (log)
|
||||
{
|
||||
log->Printf("Resolving call for class - 0x%llx and selector - 0x%llx",
|
||||
log->Printf("Resolving call for class - 0x%" PRIx64 " and selector - 0x%" PRIx64,
|
||||
isa_addr, sel_addr);
|
||||
}
|
||||
ObjCLanguageRuntime *objc_runtime = m_process_sp->GetObjCLanguageRuntime ();
|
||||
|
|
@ -896,7 +896,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
|
|||
// Yup, it was in the cache, so we can run to that address directly.
|
||||
|
||||
if (log)
|
||||
log->Printf ("Found implementation address in cache: 0x%llx", impl_addr);
|
||||
log->Printf ("Found implementation address in cache: 0x%" PRIx64, impl_addr);
|
||||
|
||||
ret_plan_sp.reset (new ThreadPlanRunToAddress (thread, impl_addr, stop_others));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
|
|||
if (metadata)
|
||||
isa_value = metadata->GetISAPtr();
|
||||
|
||||
log->Printf("AOCTV::FT [%u] Found %s (isa 0x%llx) in the ASTContext",
|
||||
log->Printf("AOCTV::FT [%u] Found %s (isa 0x%" PRIx64 ") in the ASTContext",
|
||||
current_id,
|
||||
dumper.GetCString(),
|
||||
isa_value);
|
||||
|
|
@ -670,7 +670,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
|
|||
if (!iface_decl)
|
||||
{
|
||||
if (log)
|
||||
log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for isa 0x%llx",
|
||||
log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for isa 0x%" PRIx64,
|
||||
current_id,
|
||||
(uint64_t)isa);
|
||||
|
||||
|
|
@ -682,7 +682,7 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
|
|||
if (log)
|
||||
{
|
||||
ASTDumper dumper(new_iface_type);
|
||||
log->Printf("AOCTV::FT [%u] Created %s (isa 0x%llx)",
|
||||
log->Printf("AOCTV::FT [%u] Created %s (isa 0x%" PRIx64 ")",
|
||||
current_id,
|
||||
dumper.GetCString(),
|
||||
(uint64_t)isa);
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ AppleThreadPlanStepThroughObjCTrampoline::GetDescription (Stream *s,
|
|||
s->Printf("Step through ObjC trampoline");
|
||||
else
|
||||
{
|
||||
s->Printf ("Stepping to implementation of ObjC method - obj: 0x%llx, isa: 0x%llx, sel: 0x%llx",
|
||||
m_input_values.GetValueAtIndex(0)->GetScalar().ULongLong(), m_isa_addr, m_sel_addr);
|
||||
s->Printf ("Stepping to implementation of ObjC method - obj: 0x%llx, isa: 0x%" PRIx64 ", sel: 0x%" PRIx64,
|
||||
m_input_values.GetValueAtIndex(0)->GetScalar().ULongLong(), m_isa_addr, m_sel_addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr)
|
|||
if (m_trampoline_handler->AddrIsMsgForward(target_addr))
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("Implementation lookup returned msgForward function: 0x%llx, stopping.", target_addr);
|
||||
log->Printf ("Implementation lookup returned msgForward function: 0x%" PRIx64 ", stopping.", target_addr);
|
||||
|
||||
SymbolContext sc = m_thread.GetStackFrameAtIndex(0)->GetSymbolContext(eSymbolContextEverything);
|
||||
m_run_to_sp.reset(new ThreadPlanStepOut (m_thread,
|
||||
|
|
@ -194,13 +194,13 @@ AppleThreadPlanStepThroughObjCTrampoline::ShouldStop (Event *event_ptr)
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf("Running to ObjC method implementation: 0x%llx", target_addr);
|
||||
log->Printf("Running to ObjC method implementation: 0x%" PRIx64, target_addr);
|
||||
|
||||
ObjCLanguageRuntime *objc_runtime = GetThread().GetProcess()->GetObjCLanguageRuntime();
|
||||
assert (objc_runtime != NULL);
|
||||
objc_runtime->AddToMethodCache (m_isa_addr, m_sel_addr, target_addr);
|
||||
if (log)
|
||||
log->Printf("Adding {isa-addr=0x%llx, sel-addr=0x%llx} = addr=0x%llx to cache.", m_isa_addr, m_sel_addr, target_addr);
|
||||
log->Printf("Adding {isa-addr=0x%" PRIx64 ", sel-addr=0x%" PRIx64 "} = addr=0x%" PRIx64 " to cache.", m_isa_addr, m_sel_addr, target_addr);
|
||||
|
||||
// Extract the target address from the value:
|
||||
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ ObjectContainerBSDArchive::CreateInstance
|
|||
if (file && data_sp && ObjectContainerBSDArchive::MagicBytesMatch(data))
|
||||
{
|
||||
Timer scoped_timer (__PRETTY_FUNCTION__,
|
||||
"ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8llx, file_size = 0x%8.8llx)",
|
||||
"ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8" PRIx64 ", file_size = 0x%8.8" PRIx64 ")",
|
||||
module_sp->GetFileSpec().GetDirectory().AsCString(),
|
||||
module_sp->GetFileSpec().GetFilename().AsCString(),
|
||||
file, (uint64_t) offset, (uint64_t) length);
|
||||
|
|
|
|||
|
|
@ -1186,9 +1186,9 @@ ObjectFileELF::DumpELFHeader(Stream *s, const ELFHeader &header)
|
|||
DumpELFHeader_e_type(s, header.e_type);
|
||||
s->Printf("\ne_machine = 0x%4.4x\n", header.e_machine);
|
||||
s->Printf("e_version = 0x%8.8x\n", header.e_version);
|
||||
s->Printf("e_entry = 0x%8.8llx\n", header.e_entry);
|
||||
s->Printf("e_phoff = 0x%8.8llx\n", header.e_phoff);
|
||||
s->Printf("e_shoff = 0x%8.8llx\n", header.e_shoff);
|
||||
s->Printf("e_entry = 0x%8.8" PRIx64 "\n", header.e_entry);
|
||||
s->Printf("e_phoff = 0x%8.8" PRIx64 "\n", header.e_phoff);
|
||||
s->Printf("e_shoff = 0x%8.8" PRIx64 "\n", header.e_shoff);
|
||||
s->Printf("e_flags = 0x%8.8x\n", header.e_flags);
|
||||
s->Printf("e_ehsize = 0x%4.4x\n", header.e_ehsize);
|
||||
s->Printf("e_phentsize = 0x%4.4x\n", header.e_phentsize);
|
||||
|
|
@ -1246,11 +1246,11 @@ void
|
|||
ObjectFileELF::DumpELFProgramHeader(Stream *s, const ELFProgramHeader &ph)
|
||||
{
|
||||
DumpELFProgramHeader_p_type(s, ph.p_type);
|
||||
s->Printf(" %8.8llx %8.8llx %8.8llx", ph.p_offset, ph.p_vaddr, ph.p_paddr);
|
||||
s->Printf(" %8.8llx %8.8llx %8.8x (", ph.p_filesz, ph.p_memsz, ph.p_flags);
|
||||
s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, ph.p_offset, ph.p_vaddr, ph.p_paddr);
|
||||
s->Printf(" %8.8" PRIx64 " %8.8" PRIx64 " %8.8x (", ph.p_filesz, ph.p_memsz, ph.p_flags);
|
||||
|
||||
DumpELFProgramHeader_p_flags(s, ph.p_flags);
|
||||
s->Printf(") %8.8llx", ph.p_align);
|
||||
s->Printf(") %8.8" PRIx64, ph.p_align);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
@ -1331,11 +1331,11 @@ ObjectFileELF::DumpELFSectionHeader(Stream *s, const ELFSectionHeader &sh)
|
|||
{
|
||||
s->Printf("%8.8x ", sh.sh_name);
|
||||
DumpELFSectionHeader_sh_type(s, sh.sh_type);
|
||||
s->Printf(" %8.8llx (", sh.sh_flags);
|
||||
s->Printf(" %8.8" PRIx64 " (", sh.sh_flags);
|
||||
DumpELFSectionHeader_sh_flags(s, sh.sh_flags);
|
||||
s->Printf(") %8.8llx %8.8llx %8.8llx", sh.sh_addr, sh.sh_offset, sh.sh_size);
|
||||
s->Printf(") %8.8" PRIx64 " %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addr, sh.sh_offset, sh.sh_size);
|
||||
s->Printf(" %8.8x %8.8x", sh.sh_link, sh.sh_info);
|
||||
s->Printf(" %8.8llx %8.8llx", sh.sh_addralign, sh.sh_entsize);
|
||||
s->Printf(" %8.8" PRIx64 " %8.8" PRIx64, sh.sh_addralign, sh.sh_entsize);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -787,7 +787,7 @@ ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s, const coff_opt_header_t& header)
|
|||
s->Printf (" entry = 0x%8.8x\n", header.entry);
|
||||
s->Printf (" code_offset = 0x%8.8x\n", header.code_offset);
|
||||
s->Printf (" data_offset = 0x%8.8x\n", header.data_offset);
|
||||
s->Printf (" image_base = 0x%16.16llx\n", header.image_base);
|
||||
s->Printf (" image_base = 0x%16.16" PRIx64 "\n", header.image_base);
|
||||
s->Printf (" sect_alignment = 0x%8.8x\n", header.sect_alignment);
|
||||
s->Printf (" file_alignment = 0x%8.8x\n", header.file_alignment);
|
||||
s->Printf (" major_os_system_version = 0x%4.4x\n", header.major_os_system_version);
|
||||
|
|
@ -802,10 +802,10 @@ ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s, const coff_opt_header_t& header)
|
|||
s->Printf (" checksum = 0x%8.8x\n", header.checksum);
|
||||
s->Printf (" subsystem = 0x%4.4x\n", header.subsystem);
|
||||
s->Printf (" dll_flags = 0x%4.4x\n", header.dll_flags);
|
||||
s->Printf (" stack_reserve_size = 0x%16.16llx\n", header.stack_reserve_size);
|
||||
s->Printf (" stack_commit_size = 0x%16.16llx\n", header.stack_commit_size);
|
||||
s->Printf (" heap_reserve_size = 0x%16.16llx\n", header.heap_reserve_size);
|
||||
s->Printf (" heap_commit_size = 0x%16.16llx\n", header.heap_commit_size);
|
||||
s->Printf (" stack_reserve_size = 0x%16.16" PRIx64 "\n", header.stack_reserve_size);
|
||||
s->Printf (" stack_commit_size = 0x%16.16" PRIx64 "\n", header.stack_commit_size);
|
||||
s->Printf (" heap_reserve_size = 0x%16.16" PRIx64 "\n", header.heap_reserve_size);
|
||||
s->Printf (" heap_commit_size = 0x%16.16" PRIx64 "\n", header.heap_commit_size);
|
||||
s->Printf (" loader_flags = 0x%8.8x\n", header.loader_flags);
|
||||
s->Printf (" num_data_dir_entries = 0x%8.8zx\n", header.data_dirs.size());
|
||||
uint32_t i;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ OperatingSystemPython::GetDynamicRegisterInfo ()
|
|||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
|
||||
|
||||
if (log)
|
||||
log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %llu", m_process->GetID());
|
||||
log->Printf ("OperatingSystemPython::GetDynamicRegisterInfo() fetching thread register definitions from python for pid %" PRIu64, m_process->GetID());
|
||||
|
||||
auto object_sp = m_interpreter->OSPlugin_QueryForRegisterInfo(m_interpreter->MakeScriptObject(m_python_object));
|
||||
if (!object_sp)
|
||||
|
|
@ -180,7 +180,7 @@ OperatingSystemPython::UpdateThreadList (ThreadList &old_thread_list, ThreadList
|
|||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
|
||||
|
||||
if (log)
|
||||
log->Printf ("OperatingSystemPython::UpdateThreadList() fetching thread data from python for pid %llu", m_process->GetID());
|
||||
log->Printf ("OperatingSystemPython::UpdateThreadList() fetching thread data from python for pid %" PRIu64, m_process->GetID());
|
||||
|
||||
auto object_sp = m_interpreter->OSPlugin_QueryForThreadsInfo(m_interpreter->MakeScriptObject(m_python_object));
|
||||
if (!object_sp)
|
||||
|
|
@ -255,7 +255,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, lldb::add
|
|||
// The registers data is in contiguous memory, just create the register
|
||||
// context using the address provided
|
||||
if (log)
|
||||
log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%llx, reg_data_addr = 0x%llx) creating memory register context", thread->GetID(), reg_data_addr);
|
||||
log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64 ") creating memory register context", thread->GetID(), reg_data_addr);
|
||||
reg_ctx_sp.reset (new RegisterContextMemory (*thread, 0, *GetDynamicRegisterInfo (), reg_data_addr));
|
||||
}
|
||||
else
|
||||
|
|
@ -263,7 +263,7 @@ OperatingSystemPython::CreateRegisterContextForThread (Thread *thread, lldb::add
|
|||
// No register data address is provided, query the python plug-in to let
|
||||
// it make up the data as it sees fit
|
||||
if (log)
|
||||
log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%llx) fetching register data from python", thread->GetID());
|
||||
log->Printf ("OperatingSystemPython::CreateRegisterContextForThread (tid = 0x%" PRIx64 ") fetching register data from python", thread->GetID());
|
||||
|
||||
auto object_sp = m_interpreter->OSPlugin_QueryForRegisterContextData (m_interpreter->MakeScriptObject(m_python_object),
|
||||
thread->GetID());
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ ProcessLinux::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
|
|||
{
|
||||
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
|
||||
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
|
||||
log->Printf ("ProcessLinux::%s() (pid = %i)", __FUNCTION__, GetID());
|
||||
log->Printf ("ProcessLinux::%s() (pid = %" PRIu64 ")", __FUNCTION__, GetID());
|
||||
|
||||
// Update the process thread list with this new thread.
|
||||
// FIXME: We should be using tid, not pid.
|
||||
|
|
@ -110,7 +110,7 @@ ProcessLinux::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
|
|||
}
|
||||
|
||||
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
|
||||
log->Printf ("ProcessLinux::%s() updated pid = %i", __FUNCTION__, GetID());
|
||||
log->Printf ("ProcessLinux::%s() updated pid = %" PRIu64, __FUNCTION__, GetID());
|
||||
new_thread_list.AddThread(thread_sp);
|
||||
|
||||
return new_thread_list.GetSize(false) > 0;
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ DoReadMemory(lldb::pid_t pid,
|
|||
if (log)
|
||||
ProcessPOSIXLog::IncNestLevel();
|
||||
if (log && ProcessPOSIXLog::AtTopNestLevel() && log->GetMask().Test(POSIX_LOG_MEMORY))
|
||||
log->Printf ("ProcessMonitor::%s(%d, %d, %p, %p, %d, _)", __FUNCTION__,
|
||||
log->Printf ("ProcessMonitor::%s(%" PRIu64 ", %d, %p, %p, %zd, _)", __FUNCTION__,
|
||||
pid, word_size, (void*)vm_addr, buf, size);
|
||||
|
||||
assert(sizeof(data) >= word_size);
|
||||
|
|
@ -232,7 +232,7 @@ DoWriteMemory(lldb::pid_t pid,
|
|||
if (log)
|
||||
ProcessPOSIXLog::IncNestLevel();
|
||||
if (log && ProcessPOSIXLog::AtTopNestLevel() && log->GetMask().Test(POSIX_LOG_MEMORY))
|
||||
log->Printf ("ProcessMonitor::%s(%d, %d, %p, %p, %d, _)", __FUNCTION__,
|
||||
log->Printf ("ProcessMonitor::%s(%" PRIu64 ", %d, %p, %p, %zd, _)", __FUNCTION__,
|
||||
pid, word_size, (void*)vm_addr, buf, size);
|
||||
|
||||
for (bytes_written = 0; bytes_written < size; bytes_written += remainder)
|
||||
|
|
@ -434,7 +434,7 @@ ReadRegOperation::Execute(ProcessMonitor *monitor)
|
|||
m_result = true;
|
||||
}
|
||||
if (log)
|
||||
log->Printf ("ProcessMonitor::%s() reg %s: 0x%x", __FUNCTION__,
|
||||
log->Printf ("ProcessMonitor::%s() reg %s: 0x%" PRIx64, __FUNCTION__,
|
||||
POSIXThread::GetRegisterNameFromOffset(m_offset), data);
|
||||
}
|
||||
|
||||
|
|
@ -1098,7 +1098,7 @@ ProcessMonitor::Launch(LaunchArgs *args)
|
|||
// FIXME: by using pids instead of tids, we can only support one thread.
|
||||
inferior.reset(new POSIXThread(process, pid));
|
||||
if (log)
|
||||
log->Printf ("ProcessMonitor::%s() adding pid = %i", __FUNCTION__, pid);
|
||||
log->Printf ("ProcessMonitor::%s() adding pid = %" PRIu64, __FUNCTION__, pid);
|
||||
process.GetThreadList().AddThread(inferior);
|
||||
|
||||
// Let our process instance know the thread has stopped.
|
||||
|
|
@ -1183,7 +1183,7 @@ ProcessMonitor::Attach(AttachArgs *args)
|
|||
// Update the process thread list with the attached thread.
|
||||
inferior.reset(new POSIXThread(process, pid));
|
||||
if (log)
|
||||
log->Printf ("ProcessMonitor::%s() adding tid = %i", __FUNCTION__, pid);
|
||||
log->Printf ("ProcessMonitor::%s() adding tid = %" PRIu64, __FUNCTION__, pid);
|
||||
process.GetThreadList().AddThread(inferior);
|
||||
|
||||
// Let our process instance know the thread has stopped.
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ CommunicationKDP::SendRequestPacketNoLock (const PacketStreamType &request_packe
|
|||
return true;
|
||||
|
||||
if (log)
|
||||
log->Printf ("error: failed to send packet entire packet %llu of %llu bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size);
|
||||
log->Printf ("error: failed to send packet entire packet %" PRIu64 " of %" PRIu64 " bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -210,7 +210,7 @@ CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock (DataExtractor &pac
|
|||
size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error);
|
||||
|
||||
if (log)
|
||||
log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu",
|
||||
log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %" PRIu64,
|
||||
__PRETTY_FUNCTION__,
|
||||
timeout_usec,
|
||||
Communication::ConnectionStatusAsCString (status),
|
||||
|
|
@ -876,7 +876,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
|
|||
const addr_t region_addr = packet.GetPointer (&offset);
|
||||
const uint32_t region_size = packet.GetU32 (&offset);
|
||||
const uint32_t region_prot = packet.GetU32 (&offset);
|
||||
s.Printf("\n\tregion[%llu] = { range = [0x%16.16llx - 0x%16.16llx), size = 0x%8.8x, prot = %s }", region_addr, region_addr, region_addr + region_size, region_size, GetPermissionsAsCString (region_prot));
|
||||
s.Printf("\n\tregion[%" PRIu64 "] = { range = [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), size = 0x%8.8x, prot = %s }", region_addr, region_addr, region_addr + region_size, region_size, GetPermissionsAsCString (region_prot));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -997,7 +997,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
|
|||
{
|
||||
const uint64_t addr = packet.GetU64 (&offset);
|
||||
const uint32_t size = packet.GetU32 (&offset);
|
||||
s.Printf(" (addr = 0x%16.16llx, size = %u)", addr, size);
|
||||
s.Printf(" (addr = 0x%16.16" PRIx64 ", size = %u)", addr, size);
|
||||
m_last_read_memory_addr = addr;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1006,7 +1006,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
|
|||
{
|
||||
const uint64_t addr = packet.GetU64 (&offset);
|
||||
const uint32_t size = packet.GetU32 (&offset);
|
||||
s.Printf(" (addr = 0x%16.16llx, size = %u, bytes = \n", addr, size);
|
||||
s.Printf(" (addr = 0x%16.16" PRIx64 ", size = %u, bytes = \n", addr, size);
|
||||
if (size > 0)
|
||||
DataExtractor::DumpHexBytes(&s, packet.GetData(&offset, size), size, 32, addr);
|
||||
}
|
||||
|
|
@ -1051,7 +1051,7 @@ CommunicationKDP::DumpPacket (Stream &s, const DataExtractor& packet)
|
|||
case KDP_BREAKPOINT_REMOVE64:
|
||||
{
|
||||
const uint64_t addr = packet.GetU64 (&offset);
|
||||
s.Printf(" (addr = 0x%16.16llx)", addr);
|
||||
s.Printf(" (addr = 0x%16.16" PRIx64 ")", addr);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ ProcessKDP::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new_threa
|
|||
// locker will keep a mutex locked until it goes out of scope
|
||||
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_THREAD));
|
||||
if (log && log->GetMask().Test(KDP_LOG_VERBOSE))
|
||||
log->Printf ("ProcessKDP::%s (pid = %llu)", __FUNCTION__, GetID());
|
||||
log->Printf ("ProcessKDP::%s (pid = %" PRIu64 ")", __FUNCTION__, GetID());
|
||||
|
||||
// Even though there is a CPU mask, it doesn't mean to can see each CPU
|
||||
// indivudually, there is really only one. Lets call this thread 1.
|
||||
|
|
@ -744,7 +744,7 @@ ProcessKDP::AsyncThread (void *arg)
|
|||
|
||||
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
|
||||
if (log)
|
||||
log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %llu) thread starting...", arg, pid);
|
||||
log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread starting...", arg, pid);
|
||||
|
||||
Listener listener ("ProcessKDP::AsyncThread");
|
||||
EventSP event_sp;
|
||||
|
|
@ -758,13 +758,13 @@ ProcessKDP::AsyncThread (void *arg)
|
|||
while (!done)
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %llu) listener.WaitForEvent (NULL, event_sp)...",
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp)...",
|
||||
pid);
|
||||
if (listener.WaitForEvent (NULL, event_sp))
|
||||
{
|
||||
uint32_t event_type = event_sp->GetType();
|
||||
if (log)
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %llu) Got an event of type: %d...",
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") Got an event of type: %d...",
|
||||
pid,
|
||||
event_type);
|
||||
|
||||
|
|
@ -806,7 +806,7 @@ ProcessKDP::AsyncThread (void *arg)
|
|||
|
||||
case eBroadcastBitAsyncThreadShouldExit:
|
||||
if (log)
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %llu) got eBroadcastBitAsyncThreadShouldExit...",
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") got eBroadcastBitAsyncThreadShouldExit...",
|
||||
pid);
|
||||
done = true;
|
||||
is_running = false;
|
||||
|
|
@ -814,7 +814,7 @@ ProcessKDP::AsyncThread (void *arg)
|
|||
|
||||
default:
|
||||
if (log)
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %llu) got unknown event 0x%8.8x",
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") got unknown event 0x%8.8x",
|
||||
pid,
|
||||
event_type);
|
||||
done = true;
|
||||
|
|
@ -826,7 +826,7 @@ ProcessKDP::AsyncThread (void *arg)
|
|||
else
|
||||
{
|
||||
if (log)
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %llu) listener.WaitForEvent (NULL, event_sp) => false",
|
||||
log->Printf ("ProcessKDP::AsyncThread (pid = %" PRIu64 ") listener.WaitForEvent (NULL, event_sp) => false",
|
||||
pid);
|
||||
done = true;
|
||||
}
|
||||
|
|
@ -834,7 +834,7 @@ ProcessKDP::AsyncThread (void *arg)
|
|||
}
|
||||
|
||||
if (log)
|
||||
log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %llu) thread exiting...",
|
||||
log->Printf ("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64 ") thread exiting...",
|
||||
arg,
|
||||
pid);
|
||||
|
||||
|
|
@ -965,7 +965,7 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
result.AppendErrorWithFormat ("invalid command byte 0x%llx, valid values are 1 - 255", command_byte);
|
||||
result.AppendErrorWithFormat ("invalid command byte 0x%" PRIx64 ", valid values are 1 - 255", command_byte);
|
||||
result.SetStatus (eReturnStatusFailed);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ ThreadKDP::WillResume (StateType resume_state)
|
|||
|
||||
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP));
|
||||
if (log)
|
||||
log->Printf ("Resuming thread: %4.4llx with state: %s.", GetID(), StateAsCString(resume_state));
|
||||
log->Printf ("Resuming thread: %4.4" PRIx64 " with state: %s.", GetID(), StateAsCString(resume_state));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ POSIXThread::POSIXThread(Process &process, lldb::tid_t tid)
|
|||
{
|
||||
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
|
||||
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
|
||||
log->Printf ("POSIXThread::%s (tid = %i)", __FUNCTION__, tid);
|
||||
log->Printf ("POSIXThread::%s (tid = %" PRIi64 ")", __FUNCTION__, tid);
|
||||
}
|
||||
|
||||
POSIXThread::~POSIXThread()
|
||||
|
|
@ -242,7 +242,7 @@ POSIXThread::BreakNotify(const ProcessMessage &message)
|
|||
assert(GetRegisterContext());
|
||||
lldb::addr_t pc = GetRegisterContext()->GetPC();
|
||||
if (log)
|
||||
log->Printf ("POSIXThread::%s () PC=0x%8.8llx", __FUNCTION__, pc);
|
||||
log->Printf ("POSIXThread::%s () PC=0x%8.8" PRIx64, __FUNCTION__, pc);
|
||||
lldb::BreakpointSiteSP bp_site(GetProcess()->GetBreakpointSiteList().FindByAddress(pc));
|
||||
assert(bp_site);
|
||||
lldb::break_id_t bp_id = bp_site->GetID();
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ ProcessPOSIX::DoAttachToProcessWithID(lldb::pid_t pid)
|
|||
|
||||
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS));
|
||||
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
|
||||
log->Printf ("ProcessPOSIX::%s(pid = %i)", __FUNCTION__, GetID());
|
||||
log->Printf ("ProcessPOSIX::%s(pid = %" PRIi64 ")", __FUNCTION__, GetID());
|
||||
|
||||
m_monitor = new ProcessMonitor(this, pid, error);
|
||||
|
||||
|
|
@ -380,7 +380,7 @@ ProcessPOSIX::RefreshStateAfterStop()
|
|||
// fixed when this code is fixed to handle multiple threads.
|
||||
lldb::tid_t tid = message.GetTID();
|
||||
if (log)
|
||||
log->Printf ("ProcessPOSIX::%s() pid = %i", __FUNCTION__, tid);
|
||||
log->Printf ("ProcessPOSIX::%s() pid = %" PRIi64, __FUNCTION__, tid);
|
||||
POSIXThread *thread = static_cast<POSIXThread*>(
|
||||
GetThreadList().FindThreadByID(tid, false).get());
|
||||
|
||||
|
|
@ -448,7 +448,7 @@ ProcessPOSIX::DoDeallocateMemory(lldb::addr_t addr)
|
|||
InferiorCallMunmap(this, addr, pos->second))
|
||||
m_addr_to_mmap_size.erase (pos);
|
||||
else
|
||||
error.SetErrorStringWithFormat("unable to deallocate memory at 0x%llx", addr);
|
||||
error.SetErrorStringWithFormat("unable to deallocate memory at 0x%" PRIx64, addr);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
|
@ -503,7 +503,7 @@ ProcessPOSIX::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
|
|||
{
|
||||
LogSP log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_THREAD));
|
||||
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
|
||||
log->Printf ("ProcessPOSIX::%s() (pid = %i)", __FUNCTION__, GetID());
|
||||
log->Printf ("ProcessPOSIX::%s() (pid = %" PRIi64 ")", __FUNCTION__, GetID());
|
||||
|
||||
// Update the process thread list with this new thread.
|
||||
// FIXME: We should be using tid, not pid.
|
||||
|
|
@ -514,7 +514,7 @@ ProcessPOSIX::UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thre
|
|||
}
|
||||
|
||||
if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
|
||||
log->Printf ("ProcessPOSIX::%s() updated pid = %i", __FUNCTION__, GetID());
|
||||
log->Printf ("ProcessPOSIX::%s() updated pid = %" PRIi64, __FUNCTION__, GetID());
|
||||
new_thread_list.AddThread(thread_sp);
|
||||
|
||||
return new_thread_list.GetSize(false) > 0;
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ RegisterContext_i386::LogGPR(const char *title)
|
|||
for (uint32_t i=0; i<k_num_gpr_registers; i++)
|
||||
{
|
||||
uint32_t reg = gpr_eax + i;
|
||||
log->Printf("%12s = 0x%8.8x", g_register_infos[reg].name, (&user.regs)[reg]);
|
||||
log->Printf("%12s = 0x%8.8" PRIx64, g_register_infos[reg].name, ((uint64_t*)&user.regs)[reg]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ RegisterContextDarwin_x86_64::LogGPR(Log *log, const char *format, ...)
|
|||
for (uint32_t i=0; i<k_num_gpr_registers; i++)
|
||||
{
|
||||
uint32_t reg = gpr_rax + i;
|
||||
log->Printf("%12s = 0x%16.16llx", g_register_infos[reg].name, (&gpr.rax)[reg]);
|
||||
log->Printf("%12s = 0x%16.16" PRIx64, g_register_infos[reg].name, (&gpr.rax)[reg]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,8 +213,8 @@ RegisterContextLLDB::InitializeZerothFrame()
|
|||
|
||||
m_cfa = cfa_regval + cfa_offset;
|
||||
|
||||
UnwindLogMsg ("cfa_regval = 0x%16.16llx (cfa_regval = 0x%16.16llx, cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
|
||||
UnwindLogMsg ("initialized frame current pc is 0x%llx cfa is 0x%llx using %s UnwindPlan",
|
||||
UnwindLogMsg ("cfa_regval = 0x%16.16" PRIx64 " (cfa_regval = 0x%16.16" PRIx64 ", cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
|
||||
UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64 " using %s UnwindPlan",
|
||||
(uint64_t) m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()),
|
||||
(uint64_t) m_cfa,
|
||||
m_full_unwind_plan_sp->GetSourceName().GetCString());
|
||||
|
|
@ -254,12 +254,12 @@ RegisterContextLLDB::InitializeNonZerothFrame()
|
|||
|
||||
if (log)
|
||||
{
|
||||
UnwindLogMsg ("pc = 0x%16.16llx", pc);
|
||||
UnwindLogMsg ("pc = 0x%16.16" PRIx64, pc);
|
||||
addr_t reg_val;
|
||||
if (ReadGPRValue (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP, reg_val))
|
||||
UnwindLogMsg ("fp = 0x%16.16llx", reg_val);
|
||||
UnwindLogMsg ("fp = 0x%16.16" PRIx64, reg_val);
|
||||
if (ReadGPRValue (eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, reg_val))
|
||||
UnwindLogMsg ("sp = 0x%16.16llx", reg_val);
|
||||
UnwindLogMsg ("sp = 0x%16.16" PRIx64, reg_val);
|
||||
}
|
||||
|
||||
// A pc of 0x0 means it's the end of the stack crawl
|
||||
|
|
@ -297,7 +297,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
|
|||
// pc and see if we can get any further.
|
||||
if (GetNextFrame().get() && GetNextFrame()->IsValid() && GetNextFrame()->IsFrameZero())
|
||||
{
|
||||
UnwindLogMsg ("had a pc of 0x%llx which is not in executable memory but on frame 1 -- allowing it once.",
|
||||
UnwindLogMsg ("had a pc of 0x%" PRIx64 " which is not in executable memory but on frame 1 -- allowing it once.",
|
||||
(uint64_t) pc);
|
||||
m_frame_type = eSkipFrame;
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
|
|||
return;
|
||||
}
|
||||
|
||||
UnwindLogMsg ("initialized frame cfa is 0x%llx", (uint64_t) m_cfa);
|
||||
UnwindLogMsg ("initialized frame cfa is 0x%" PRIx64, (uint64_t) m_cfa);
|
||||
return;
|
||||
}
|
||||
m_frame_type = eNotAValidFrame;
|
||||
|
|
@ -506,7 +506,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
|
|||
|
||||
m_cfa = cfa_regval + cfa_offset;
|
||||
|
||||
UnwindLogMsg ("cfa_regval = 0x%16.16llx (cfa_regval = 0x%16.16llx, cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
|
||||
UnwindLogMsg ("cfa_regval = 0x%16.16" PRIx64 " (cfa_regval = 0x%16.16" PRIx64 ", cfa_offset = %i)", m_cfa, cfa_regval, cfa_offset);
|
||||
|
||||
// A couple of sanity checks..
|
||||
if (cfa_regval == LLDB_INVALID_ADDRESS || cfa_regval == 0 || cfa_regval == 1)
|
||||
|
|
@ -544,7 +544,7 @@ RegisterContextLLDB::InitializeNonZerothFrame()
|
|||
}
|
||||
}
|
||||
|
||||
UnwindLogMsg ("initialized frame current pc is 0x%llx cfa is 0x%llx",
|
||||
UnwindLogMsg ("initialized frame current pc is 0x%" PRIx64 " cfa is 0x%" PRIx64,
|
||||
(uint64_t) m_current_pc.GetLoadAddress (exe_ctx.GetTargetPtr()), (uint64_t) m_cfa);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -215,14 +215,14 @@ StopInfoMachException::GetDescription ()
|
|||
if (exc_desc)
|
||||
strm.PutCString(exc_desc);
|
||||
else
|
||||
strm.Printf("EXC_??? (%llu)", m_value);
|
||||
strm.Printf("EXC_??? (%" PRIu64 ")", m_value);
|
||||
|
||||
if (m_exc_data_count >= 1)
|
||||
{
|
||||
if (code_desc)
|
||||
strm.Printf(" (%s=%s", code_label, code_desc);
|
||||
else
|
||||
strm.Printf(" (%s=%llu", code_label, m_exc_code);
|
||||
strm.Printf(" (%s=%" PRIu64, code_label, m_exc_code);
|
||||
}
|
||||
|
||||
if (m_exc_data_count >= 2)
|
||||
|
|
@ -230,7 +230,7 @@ StopInfoMachException::GetDescription ()
|
|||
if (subcode_desc)
|
||||
strm.Printf(", %s=%s", subcode_label, subcode_desc);
|
||||
else
|
||||
strm.Printf(", %s=0x%llx", subcode_label, m_exc_subcode);
|
||||
strm.Printf(", %s=0x%" PRIx64, subcode_label, m_exc_subcode);
|
||||
}
|
||||
|
||||
if (m_exc_data_count > 0)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ UnwindLLDB::DoGetFrameCount()
|
|||
{
|
||||
TimeValue now(TimeValue::Now());
|
||||
uint64_t delta_t = now - time_value;
|
||||
printf ("%u frames in %llu.%09llu ms (%g frames/sec)\n",
|
||||
printf ("%u frames in %" PRIu64 ".%09llu ms (%g frames/sec)\n",
|
||||
FRAME_COUNT,
|
||||
delta_t / TimeValue::NanoSecPerSec,
|
||||
delta_t % TimeValue::NanoSecPerSec,
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ UnwindMacOSXFrameBackchain::GetStackFrameData_i386 (const ExecutionContext &exe_
|
|||
// printf(" ------------------ ------------------ \n");
|
||||
// for (i=0; i<m_cursors.size(); ++i)
|
||||
// {
|
||||
// printf("[%3u] 0x%16.16llx 0x%16.16llx\n", i, m_cursors[i].pc, m_cursors[i].fp);
|
||||
// printf("[%3u] 0x%16.16" PRIx64 " 0x%16.16" PRIx64 "\n", i, m_cursors[i].pc, m_cursors[i].fp);
|
||||
// }
|
||||
return m_cursors.size();
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue