[Lldb-commits] [lldb] r142534 - in /lldb/trunk: include/lldb/ include/lldb/Symbol/ include/lldb/Target/ lldb.xcodeproj/ source/API/ source/Commands/ source/Core/ source/Interpreter/ source/Plugins/Process/MacOSX-Kernel/ source/Plugins/Process/gdb-remote/ source/Plugins/SymbolFile/DWARF/ source/Symbol/ source/Target/
Greg Clayton
gclayton at apple.com
Wed Oct 19 11:09:39 PDT 2011
Author: gclayton
Date: Wed Oct 19 13:09:39 2011
New Revision: 142534
URL: http://llvm.org/viewvc/llvm-project?rev=142534&view=rev
Log:
Moved lldb::user_id_t values to be 64 bit. This was going to be needed for
process IDs, and thread IDs, but was mainly needed for for the UserID's for
Types so that DWARF with debug map can work flawlessly. With DWARF in .o files
the type ID was the DIE offset in the DWARF for the .o file which is not
unique across all .o files, so now the SymbolFileDWARFDebugMap class will
make the .o file index part (the high 32 bits) of the unique type identifier
so it can uniquely identify the types.
Modified:
lldb/trunk/include/lldb/Symbol/Symbol.h
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/include/lldb/lldb-defines.h
lldb/trunk/include/lldb/lldb-types.h
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/API/SBBlock.cpp
lldb/trunk/source/API/SBDebugger.cpp
lldb/trunk/source/API/SBFunction.cpp
lldb/trunk/source/API/SBProcess.cpp
lldb/trunk/source/API/SBThread.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Core/Section.cpp
lldb/trunk/source/Core/UserID.cpp
lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
lldb/trunk/source/Symbol/Block.cpp
lldb/trunk/source/Symbol/CompileUnit.cpp
lldb/trunk/source/Symbol/Function.cpp
lldb/trunk/source/Symbol/Symbol.cpp
lldb/trunk/source/Symbol/SymbolContext.cpp
lldb/trunk/source/Symbol/Type.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/StackID.cpp
lldb/trunk/source/Target/Target.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Target/ThreadList.cpp
lldb/trunk/source/Target/ThreadPlan.cpp
lldb/trunk/source/Target/ThreadPlanBase.cpp
lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp
lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp
Modified: lldb/trunk/include/lldb/Symbol/Symbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symbol.h?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symbol.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symbol.h Wed Oct 19 13:09:39 2011
@@ -19,7 +19,6 @@
namespace lldb_private {
class Symbol :
- public UserID, // Used to uniquely identify this symbol in its symbol table
public SymbolContextScope
{
public:
@@ -28,7 +27,7 @@
// and sorting requirements.
Symbol();
- Symbol (lldb::user_id_t symID,
+ Symbol (uint32_t symID,
const char *name,
bool name_is_mangled,
lldb::SymbolType type,
@@ -41,7 +40,7 @@
uint32_t size,
uint32_t flags);
- Symbol (lldb::user_id_t symID,
+ Symbol (uint32_t symID,
const char *name,
bool name_is_mangled,
lldb::SymbolType type,
@@ -57,6 +56,9 @@
const Symbol&
operator= (const Symbol& rhs);
+ void
+ Clear();
+
bool
Compare (const ConstString& name, lldb::SymbolType type) const;
@@ -78,6 +80,18 @@
const ConstString &
GetName () { return m_mangled.GetName(); }
+ uint32_t
+ GetID() const
+ {
+ return m_uid;
+ }
+
+ void
+ SetID(uint32_t uid)
+ {
+ m_uid = uid;
+ }
+
Mangled&
GetMangled () { return m_mangled; }
@@ -188,6 +202,7 @@
protected:
+ uint32_t m_uid; // User ID (usually the original symbol table index)
Mangled m_mangled; // uniqued symbol name/mangled name pair
lldb::SymbolType m_type; // symbol type
uint16_t m_type_data; // data specific to m_type
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Wed Oct 19 13:09:39 2011
@@ -245,8 +245,8 @@
m_executable (),
m_arguments (),
m_environment (),
- m_uid (LLDB_INVALID_UID),
- m_gid (LLDB_INVALID_UID),
+ m_uid (UINT32_MAX),
+ m_gid (UINT32_MAX),
m_arch(),
m_pid (LLDB_INVALID_PROCESS_ID)
{
@@ -258,8 +258,8 @@
m_executable (name, false),
m_arguments (),
m_environment(),
- m_uid (LLDB_INVALID_UID),
- m_gid (LLDB_INVALID_UID),
+ m_uid (UINT32_MAX),
+ m_gid (UINT32_MAX),
m_arch (arch),
m_pid (pid)
{
@@ -271,8 +271,8 @@
m_executable.Clear();
m_arguments.Clear();
m_environment.Clear();
- m_uid = LLDB_INVALID_UID;
- m_gid = LLDB_INVALID_UID;
+ m_uid = UINT32_MAX;
+ m_gid = UINT32_MAX;
m_arch.Clear();
m_pid = LLDB_INVALID_PROCESS_ID;
}
Modified: lldb/trunk/include/lldb/lldb-defines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-defines.h?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-defines.h (original)
+++ lldb/trunk/include/lldb/lldb-defines.h Wed Oct 19 13:09:39 2011
@@ -72,7 +72,7 @@
#define LLDB_INVALID_IVAR_OFFSET UINT32_MAX
#define LLDB_INVALID_IMAGE_TOKEN UINT32_MAX
#define LLDB_INVALID_REGNUM UINT32_MAX
-#define LLDB_INVALID_UID UINT32_MAX
+#define LLDB_INVALID_UID UINT64_MAX
#define LLDB_INVALID_PROCESS_ID 0
#define LLDB_INVALID_THREAD_ID 0
#define LLDB_INVALID_FRAME_ID UINT32_MAX
Modified: lldb/trunk/include/lldb/lldb-types.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-types.h?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-types.h (original)
+++ lldb/trunk/include/lldb/lldb-types.h Wed Oct 19 13:09:39 2011
@@ -96,7 +96,7 @@
namespace lldb
{
typedef uint64_t addr_t;
- typedef uint32_t user_id_t;
+ typedef uint64_t user_id_t;
typedef int32_t pid_t;
typedef uint32_t tid_t;
typedef int32_t break_id_t;
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Oct 19 13:09:39 2011
@@ -3581,7 +3581,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
- DEBUG_INFORMATION_FORMAT = dwarf;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
Modified: lldb/trunk/source/API/SBBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBlock.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBlock.cpp (original)
+++ lldb/trunk/source/API/SBBlock.cpp Wed Oct 19 13:09:39 2011
@@ -174,7 +174,7 @@
if (m_opaque_ptr)
{
lldb::user_id_t id = m_opaque_ptr->GetID();
- description.Printf ("Block: {id: %d} ", id);
+ description.Printf ("Block: {id: %llu} ", id);
if (IsInlined())
{
description.Printf (" (inlined, '%s') ", GetInlinedName());
Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Wed Oct 19 13:09:39 2011
@@ -969,7 +969,7 @@
{
const char *name = m_opaque_sp->GetInstanceName().AsCString();
user_id_t id = m_opaque_sp->GetID();
- description.Printf ("Debugger (instance: \"%s\", id: %d)", name, id);
+ description.Printf ("Debugger (instance: \"%s\", id: %llu)", name, id);
}
else
description.Printf ("No value");
Modified: lldb/trunk/source/API/SBFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFunction.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFunction.cpp (original)
+++ lldb/trunk/source/API/SBFunction.cpp Wed Oct 19 13:09:39 2011
@@ -107,9 +107,9 @@
{
if (m_opaque_ptr)
{
- s.Printf ("SBFunction: id = 0x%8.8x, name = %s",
- m_opaque_ptr->GetID(),
- m_opaque_ptr->GetName().AsCString());
+ s.Printf ("SBFunction: id = 0x%8.8llx, name = %s",
+ m_opaque_ptr->GetID(),
+ m_opaque_ptr->GetName().AsCString());
Type *func_type = m_opaque_ptr->GetType();
if (func_type)
s.Printf(", type = %s", func_type->GetName().AsCString());
Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Wed Oct 19 13:09:39 2011
@@ -303,7 +303,7 @@
char message[1024];
int message_len = ::snprintf (message,
sizeof (message),
- "Process %d %s\n",
+ "Process %llu %s\n",
m_opaque_sp->GetID(),
SBDebugger::StateAsCString (event_state));
@@ -321,7 +321,7 @@
char message[1024];
::snprintf (message,
sizeof (message),
- "Process %d %s\n",
+ "Process %llu %s\n",
m_opaque_sp->GetID(),
SBDebugger::StateAsCString (event_state));
@@ -809,7 +809,7 @@
if (exe_module)
exe_name = exe_module->GetFileSpec().GetFilename().AsCString();
- description.Printf ("SBProcess: pid = %d, state = %s, threads = %d%s%s",
+ description.Printf ("SBProcess: pid = %llu, state = %s, threads = %d%s%s",
m_opaque_sp->GetID(),
lldb_private::StateAsCString (GetState()),
GetNumThreads(),
Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Wed Oct 19 13:09:39 2011
@@ -954,7 +954,7 @@
if (m_opaque_sp)
{
StreamString strm;
- description.Printf("SBThread: tid = 0x%4.4x", m_opaque_sp->GetID());
+ description.Printf("SBThread: tid = 0x%4.4llx", m_opaque_sp->GetID());
}
else
description.Printf ("No value");
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Wed Oct 19 13:09:39 2011
@@ -323,7 +323,7 @@
{
const char *archname = exe_module->GetArchitecture().GetArchitectureName();
- result.AppendMessageWithFormat ("Process %i launched: '%s' (%s)\n", process->GetID(), filename, archname);
+ result.AppendMessageWithFormat ("Process %llu launched: '%s' (%s)\n", process->GetID(), filename, archname);
result.SetDidChangeProcessState (true);
if (m_options.stop_at_entry == false)
{
@@ -573,7 +573,7 @@
state = process->GetState();
if (process->IsAlive() && state != eStateConnected)
{
- result.AppendErrorWithFormat ("Process %u is currently being debugged, kill the process before attaching.\n",
+ result.AppendErrorWithFormat ("Process %llu is currently being debugged, kill the process before attaching.\n",
process->GetID());
result.SetStatus (eReturnStatusFailed);
return false;
@@ -676,7 +676,7 @@
StateType state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -728,7 +728,7 @@
StateType state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -859,13 +859,13 @@
Error error(process->Resume());
if (error.Success())
{
- result.AppendMessageWithFormat ("Process %i resuming\n", process->GetID());
+ result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
if (synchronous_execution)
{
state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -923,7 +923,7 @@
return false;
}
- result.AppendMessageWithFormat ("Detaching from process %i\n", process->GetID());
+ result.AppendMessageWithFormat ("Detaching from process %llu\n", process->GetID());
Error error (process->Detach());
if (error.Success())
{
@@ -1030,7 +1030,7 @@
{
if (process->IsAlive())
{
- result.AppendErrorWithFormat ("Process %u is currently being debugged, kill the process before connecting.\n",
+ result.AppendErrorWithFormat ("Process %llu is currently being debugged, kill the process before connecting.\n",
process->GetID());
result.SetStatus (eReturnStatusFailed);
return false;
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Wed Oct 19 13:09:39 2011
@@ -3581,7 +3581,7 @@
case eInputReaderDone:
if (!got_interrupted && !batch_mode)
{
- out_stream->Printf ("Stop hook #%d added.\n", new_stop_hook->GetID());
+ out_stream->Printf ("Stop hook #%llu added.\n", new_stop_hook->GetID());
out_stream->Flush();
}
break;
@@ -3667,7 +3667,7 @@
{
// Use one-liner.
new_hook_sp->GetCommandPointer()->AppendString (m_options.m_one_liner.c_str());
- result.AppendMessageWithFormat("Stop hook #%d added.\n", new_hook_sp->GetID());
+ result.AppendMessageWithFormat("Stop hook #%llu added.\n", new_hook_sp->GetID());
}
else
{
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Wed Oct 19 13:09:39 2011
@@ -546,7 +546,7 @@
// }
process->GetThreadList().SetSelectedThreadByID (thread->GetID());
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
}
@@ -685,7 +685,7 @@
thread->SetResumeState (eStateSuspended);
}
}
- result.AppendMessageWithFormat ("in process %i\n", process->GetID());
+ result.AppendMessageWithFormat ("in process %llu\n", process->GetID());
}
}
else
@@ -703,7 +703,7 @@
Thread *thread = process->GetThreadList().GetThreadAtIndex(idx).get();
if (thread == current_thread)
{
- result.AppendMessageWithFormat ("Resuming thread 0x%4.4x in process %i\n", thread->GetID(), process->GetID());
+ result.AppendMessageWithFormat ("Resuming thread 0x%4.4llx in process %llu\n", thread->GetID(), process->GetID());
thread->SetResumeState (eStateRunning);
}
else
@@ -716,13 +716,13 @@
Error error (process->Resume());
if (error.Success())
{
- result.AppendMessageWithFormat ("Process %i resuming\n", process->GetID());
+ result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
if (synchronous_execution)
{
state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
@@ -1043,13 +1043,13 @@
Error error (process->Resume ());
if (error.Success())
{
- result.AppendMessageWithFormat ("Process %i resuming\n", process->GetID());
+ result.AppendMessageWithFormat ("Process %llu resuming\n", process->GetID());
if (synchronous_execution)
{
StateType state = process->WaitForProcessToStop (NULL);
result.SetDidChangeProcessState (true);
- result.AppendMessageWithFormat ("Process %i %s\n", process->GetID(), StateAsCString (state));
+ result.AppendMessageWithFormat ("Process %llu %s\n", process->GetID(), StateAsCString (state));
result.SetStatus (eReturnStatusSuccessFinishNoResult);
}
else
Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Wed Oct 19 13:09:39 2011
@@ -703,7 +703,7 @@
Variable *var = variable_list.GetVariableAtIndex (var_idx).get();
if (var && var->LocationIsValidForAddress (*this))
{
- s->Printf (" Variable: id = {0x%8.8x}, name = \"%s\", type= \"%s\", location =",
+ s->Printf (" Variable: id = {0x%8.8llx}, name = \"%s\", type= \"%s\", location =",
var->GetID(),
var->GetName().GetCString(),
var->GetType()->GetName().GetCString());
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Wed Oct 19 13:09:39 2011
@@ -1524,7 +1524,7 @@
var_name_begin += ::strlen ("process.");
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
{
- s.Printf("%i", process->GetID());
+ s.Printf("%llu", process->GetID());
var_success = true;
}
else if ((::strncmp (var_name_begin, "name}", strlen("name}")) == 0) ||
@@ -1562,7 +1562,7 @@
var_name_begin += ::strlen ("thread.");
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
{
- s.Printf("0x%4.4x", thread->GetID());
+ s.Printf("0x%4.4llx", thread->GetID());
var_success = true;
}
else if (::strncmp (var_name_begin, "index}", strlen("index}")) == 0)
@@ -1733,7 +1733,7 @@
if (::strncmp (var_name_begin, "id}", strlen("id}")) == 0)
{
if (sc->function)
- s.Printf("function{0x%8.8x}", sc->function->GetID());
+ s.Printf("function{0x%8.8llx}", sc->function->GetID());
else
s.Printf("symbol[%u]", sc->symbol->GetID());
Modified: lldb/trunk/source/Core/Section.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Section.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Core/Section.cpp (original)
+++ lldb/trunk/source/Core/Section.cpp Wed Oct 19 13:09:39 2011
@@ -228,7 +228,7 @@
{
// s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
s->Indent();
- s->Printf("0x%8.8x %-14s ", GetID(), GetSectionTypeAsCString (m_type));
+ s->Printf("0x%8.8llx %-14s ", GetID(), GetSectionTypeAsCString (m_type));
bool resolved = true;
addr_t addr = LLDB_INVALID_ADDRESS;
Modified: lldb/trunk/source/Core/UserID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/UserID.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Core/UserID.cpp (original)
+++ lldb/trunk/source/Core/UserID.cpp Wed Oct 19 13:09:39 2011
@@ -20,6 +20,6 @@
Stream&
lldb_private::operator << (Stream& strm, const UserID& uid)
{
- strm.Printf("{0x%8.8x}", uid.GetID());
+ strm.Printf("{0x%8.8llx}", uid.GetID());
return strm;
}
Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Wed Oct 19 13:09:39 2011
@@ -204,7 +204,7 @@
PyRun_SimpleString (run_string.GetData());
run_string.Clear();
- run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %d')", m_dictionary_name.c_str(),
+ run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %llu')", m_dictionary_name.c_str(),
interpreter.GetDebugger().GetID());
PyRun_SimpleString (run_string.GetData());
@@ -306,13 +306,13 @@
StreamString run_string;
- run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %d')", m_dictionary_name.c_str(),
+ run_string.Printf ("run_one_line (%s, 'lldb.debugger_unique_id = %llu')", m_dictionary_name.c_str(),
GetCommandInterpreter().GetDebugger().GetID());
PyRun_SimpleString (run_string.GetData());
run_string.Clear();
- run_string.Printf ("run_one_line (%s, 'lldb.debugger = lldb.SBDebugger.FindDebuggerWithID (%d)')",
+ run_string.Printf ("run_one_line (%s, 'lldb.debugger = lldb.SBDebugger.FindDebuggerWithID (%llu)')",
m_dictionary_name.c_str(),
GetCommandInterpreter().GetDebugger().GetID());
PyRun_SimpleString (run_string.GetData());
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Wed Oct 19 13:09:39 2011
@@ -294,7 +294,7 @@
// 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 = %i)", __FUNCTION__, GetID());
+ log->Printf ("ProcessKDP::%s (pid = %llu)", __FUNCTION__, GetID());
// We currently are making only one thread per core and we
// actually don't know about actual threads. Eventually we
@@ -698,7 +698,7 @@
LogSP log (ProcessKDPLog::GetLogIfAllCategoriesSet (KDP_LOG_PROCESS));
if (log)
- log->Printf ("ProcessKDP::%s (arg = %p, pid = %i) thread starting...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessKDP::%s (arg = %p, pid = %llu) thread starting...", __FUNCTION__, arg, process->GetID());
Listener listener ("ProcessKDP::AsyncThread");
EventSP event_sp;
@@ -713,14 +713,14 @@
while (!done)
{
if (log)
- log->Printf ("ProcessKDP::%s (arg = %p, pid = %i) listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessKDP::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
if (listener.WaitForEvent (NULL, event_sp))
{
const uint32_t event_type = event_sp->GetType();
if (event_sp->BroadcasterIs (&process->m_async_broadcaster))
{
if (log)
- log->Printf ("ProcessKDP::%s (arg = %p, pid = %i) Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type);
+ log->Printf ("ProcessKDP::%s (arg = %p, pid = %llu) Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type);
switch (event_type)
{
@@ -772,13 +772,13 @@
case eBroadcastBitAsyncThreadShouldExit:
if (log)
- log->Printf ("ProcessKDP::%s (arg = %p, pid = %i) got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessKDP::%s (arg = %p, pid = %llu) got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID());
done = true;
break;
default:
if (log)
- log->Printf ("ProcessKDP::%s (arg = %p, pid = %i) got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type);
+ log->Printf ("ProcessKDP::%s (arg = %p, pid = %llu) got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type);
done = true;
break;
}
@@ -795,14 +795,14 @@
else
{
if (log)
- log->Printf ("ProcessKDP::%s (arg = %p, pid = %i) listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessKDP::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID());
done = true;
}
}
}
if (log)
- log->Printf ("ProcessKDP::%s (arg = %p, pid = %i) thread exiting...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessKDP::%s (arg = %p, pid = %llu) thread exiting...", __FUNCTION__, arg, process->GetID());
process->m_async_thread = LLDB_INVALID_HOST_THREAD;
return NULL;
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp Wed Oct 19 13:09:39 2011
@@ -76,7 +76,7 @@
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
- log->Printf ("Resuming thread: %4.4x with state: %s.", GetID(), StateAsCString(resume_state));
+ log->Printf ("Resuming thread: %4.4llx with state: %s.", GetID(), StateAsCString(resume_state));
// ProcessKDP &process = GetKDPProcess();
// switch (resume_state)
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Wed Oct 19 13:09:39 2011
@@ -179,7 +179,7 @@
{
// Get all registers in one packet
if (thread_suffix_supported)
- packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4x;", m_thread.GetID());
+ packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4llx;", m_thread.GetID());
else
packet_len = ::snprintf (packet, sizeof(packet), "g");
assert (packet_len < (sizeof(packet) - 1));
@@ -195,7 +195,7 @@
// Get each register individually
if (thread_suffix_supported)
- packet_len = ::snprintf (packet, sizeof(packet), "p%x;thread:%4.4x;", reg, m_thread.GetID());
+ packet_len = ::snprintf (packet, sizeof(packet), "p%x;thread:%4.4llx;", reg, m_thread.GetID());
else
packet_len = ::snprintf (packet, sizeof(packet), "p%x", reg);
assert (packet_len < (sizeof(packet) - 1));
@@ -282,7 +282,7 @@
lldb::endian::InlHostByteOrder());
if (thread_suffix_supported)
- packet.Printf (";thread:%4.4x;", m_thread.GetID());
+ packet.Printf (";thread:%4.4llx;", m_thread.GetID());
// Invalidate all register values
InvalidateIfNeeded (true);
@@ -309,7 +309,7 @@
lldb::endian::InlHostByteOrder());
if (thread_suffix_supported)
- packet.Printf (";thread:%4.4x;", m_thread.GetID());
+ packet.Printf (";thread:%4.4llx;", m_thread.GetID());
// Invalidate just this register
m_reg_valid[reg] = false;
@@ -346,7 +346,7 @@
{
int packet_len = 0;
if (thread_suffix_supported)
- packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4x", m_thread.GetID());
+ packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4llx", m_thread.GetID());
else
packet_len = ::snprintf (packet, sizeof(packet), "g");
assert (packet_len < (sizeof(packet) - 1));
@@ -363,7 +363,7 @@
if (thread_suffix_supported)
{
char thread_id_cstr[64];
- ::snprintf (thread_id_cstr, sizeof(thread_id_cstr), ";thread:%4.4x;", m_thread.GetID());
+ ::snprintf (thread_id_cstr, sizeof(thread_id_cstr), ";thread:%4.4llx;", m_thread.GetID());
response_str.append (thread_id_cstr);
}
data_sp.reset (new DataBufferHeap (response_str.c_str(), response_str.size()));
@@ -457,7 +457,7 @@
lldb::endian::InlHostByteOrder());
if (thread_suffix_supported)
- packet.Printf (";thread:%4.4x;", m_thread.GetID());
+ packet.Printf (";thread:%4.4llx;", m_thread.GetID());
m_reg_valid[reg] = false;
if (gdb_comm.SendPacketAndWaitForResponse(packet.GetString().c_str(),
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Wed Oct 19 13:09:39 2011
@@ -1082,7 +1082,7 @@
// locker will keep a mutex locked until it goes out of scope
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD));
if (log && log->GetMask().Test(GDBR_LOG_VERBOSE))
- log->Printf ("ProcessGDBRemote::%s (pid = %i)", __FUNCTION__, GetID());
+ log->Printf ("ProcessGDBRemote::%s (pid = %llu)", __FUNCTION__, GetID());
// Update the thread list's stop id immediately so we don't recurse into this function.
std::vector<lldb::tid_t> thread_ids;
@@ -1798,12 +1798,12 @@
user_id_t site_id = bp_site->GetID();
const addr_t addr = bp_site->GetLoadAddress();
if (log)
- log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %d) address = 0x%llx", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %llu) address = 0x%llx", site_id, (uint64_t)addr);
if (bp_site->IsEnabled())
{
if (log)
- log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %d) address = 0x%llx -- SUCCESS (already enabled)", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %llu) address = 0x%llx -- SUCCESS (already enabled)", site_id, (uint64_t)addr);
return error;
}
else
@@ -1860,7 +1860,7 @@
user_id_t site_id = bp_site->GetID();
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
if (log)
- log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %d) addr = 0x%8.8llx", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %llu) addr = 0x%8.8llx", site_id, (uint64_t)addr);
if (bp_site->IsEnabled())
{
@@ -1889,7 +1889,7 @@
else
{
if (log)
- log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %d) addr = 0x%8.8llx -- SUCCESS (already disabled)", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %llu) addr = 0x%8.8llx -- SUCCESS (already disabled)", site_id, (uint64_t)addr);
return error;
}
@@ -1926,11 +1926,11 @@
addr_t addr = wp->GetLoadAddress();
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS));
if (log)
- log->Printf ("ProcessGDBRemote::EnableWatchpoint(watchID = %d)", watchID);
+ log->Printf ("ProcessGDBRemote::EnableWatchpoint(watchID = %llu)", watchID);
if (wp->IsEnabled())
{
if (log)
- log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %d) addr = 0x%8.8llx: watchpoint already enabled.", watchID, (uint64_t)addr);
+ log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %llu) addr = 0x%8.8llx: watchpoint already enabled.", watchID, (uint64_t)addr);
return error;
}
@@ -1970,12 +1970,12 @@
addr_t addr = wp->GetLoadAddress();
if (log)
- log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %d) addr = 0x%8.8llx", watchID, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %llu) addr = 0x%8.8llx", watchID, (uint64_t)addr);
if (!wp->IsEnabled())
{
if (log)
- log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %d) addr = 0x%8.8llx -- SUCCESS (already disabled)", watchID, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableWatchpoint (watchID = %llu) addr = 0x%8.8llx -- SUCCESS (already disabled)", watchID, (uint64_t)addr);
return error;
}
@@ -2307,7 +2307,7 @@
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PROCESS));
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) thread starting...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) thread starting...", __FUNCTION__, arg, process->GetID());
Listener listener ("ProcessGDBRemote::AsyncThread");
EventSP event_sp;
@@ -2322,14 +2322,14 @@
while (!done)
{
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp)...", __FUNCTION__, arg, process->GetID());
if (listener.WaitForEvent (NULL, event_sp))
{
const uint32_t event_type = event_sp->GetType();
if (event_sp->BroadcasterIs (&process->m_async_broadcaster))
{
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type);
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) Got an event of type: %d...", __FUNCTION__, arg, process->GetID(), event_type);
switch (event_type)
{
@@ -2342,7 +2342,7 @@
const char *continue_cstr = (const char *)continue_packet->GetBytes ();
const size_t continue_cstr_len = continue_packet->GetByteSize ();
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) got eBroadcastBitAsyncContinue: %s", __FUNCTION__, arg, process->GetID(), continue_cstr);
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got eBroadcastBitAsyncContinue: %s", __FUNCTION__, arg, process->GetID(), continue_cstr);
if (::strstr (continue_cstr, "vAttach") == NULL)
process->SetPrivateState(eStateRunning);
@@ -2379,13 +2379,13 @@
case eBroadcastBitAsyncThreadShouldExit:
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got eBroadcastBitAsyncThreadShouldExit...", __FUNCTION__, arg, process->GetID());
done = true;
break;
default:
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type);
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) got unknown event 0x%8.8x", __FUNCTION__, arg, process->GetID(), event_type);
done = true;
break;
}
@@ -2402,14 +2402,14 @@
else
{
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) listener.WaitForEvent (NULL, event_sp) => false", __FUNCTION__, arg, process->GetID());
done = true;
}
}
}
if (log)
- log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %i) thread exiting...", __FUNCTION__, arg, process->GetID());
+ log->Printf ("ProcessGDBRemote::%s (arg = %p, pid = %llu) thread exiting...", __FUNCTION__, arg, process->GetID());
process->m_async_thread = LLDB_INVALID_HOST_THREAD;
return NULL;
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Wed Oct 19 13:09:39 2011
@@ -77,7 +77,7 @@
int signo = GetResumeSignal();
lldb::LogSP log(lldb_private::GetLogIfAnyCategoriesSet (GDBR_LOG_THREAD));
if (log)
- log->Printf ("Resuming thread: %4.4x with state: %s.", GetID(), StateAsCString(resume_state));
+ log->Printf ("Resuming thread: %4.4llx with state: %s.", GetID(), StateAsCString(resume_state));
ProcessGDBRemote &process = GetGDBProcess();
switch (resume_state)
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed Oct 19 13:09:39 2011
@@ -163,6 +163,7 @@
SymbolFileDWARF::SymbolFileDWARF(ObjectFile* objfile) :
SymbolFile (objfile),
+ UserID (0), // Used by SymbolFileDWARFDebugMap to when this class parses .o files to contain the .o file index/ID
m_debug_map_symfile (NULL),
m_clang_tu_decl (NULL),
m_flags(),
@@ -551,8 +552,8 @@
SymbolFileDWARF::GetDWARFCompileUnitForUID(lldb::user_id_t cu_uid)
{
DWARFDebugInfo* info = DebugInfo();
- if (info)
- return info->GetCompileUnit(cu_uid).get();
+ if (info && UserIDMatches(cu_uid))
+ return info->GetCompileUnit((dw_offset_t)cu_uid).get();
return NULL;
}
@@ -609,7 +610,11 @@
cu_file_spec.SetFile (fullpath.c_str(), false);
}
- compile_unit_sp.reset(new CompileUnit(m_obj_file->GetModule(), curr_cu, cu_file_spec, curr_cu->GetOffset(), cu_language));
+ compile_unit_sp.reset(new CompileUnit (m_obj_file->GetModule(),
+ curr_cu,
+ cu_file_spec,
+ MakeUserID(curr_cu->GetOffset()),
+ cu_language));
if (compile_unit_sp.get())
{
curr_cu->SetUserData(compile_unit_sp.get());
@@ -722,9 +727,10 @@
func_range.GetBaseAddress().ResolveLinkedAddress();
+ const user_id_t func_user_id = MakeUserID(die->GetOffset());
func_sp.reset(new Function (sc.comp_unit,
- die->GetOffset(), // UserID is the DIE offset
- die->GetOffset(),
+ func_user_id, // UserID is the DIE offset
+ func_user_id,
func_name,
func_type,
func_range)); // first address range
@@ -755,7 +761,7 @@
for (func_idx = 0; func_idx < num_funtions; ++func_idx)
{
const DWARFDebugInfoEntry *die = function_dies.GetDIEPtrAtIndex(func_idx);
- if (sc.comp_unit->FindFunctionByUID (die->GetOffset()).get() == NULL)
+ if (sc.comp_unit->FindFunctionByUID (MakeUserID(die->GetOffset())).get() == NULL)
{
if (ParseCompileUnitFunction(sc, dwarf_cu, die))
++functions_added;
@@ -1030,7 +1036,7 @@
}
else
{
- BlockSP block_sp(new Block (die->GetOffset()));
+ BlockSP block_sp(new Block (MakeUserID(die->GetOffset())));
parent_block->AddChild(block_sp);
block = block_sp.get();
}
@@ -1248,13 +1254,13 @@
else
{
if (name)
- ReportError ("0x%8.8x: DW_TAG_member '%s' refers to type 0x%8.8x which was unable to be parsed",
- die->GetOffset(),
+ ReportError ("0x%8.8llx: DW_TAG_member '%s' refers to type 0x%8.8llx which was unable to be parsed",
+ MakeUserID(die->GetOffset()),
name,
encoding_uid);
else
- ReportError ("0x%8.8x: DW_TAG_member refers to type 0x%8.8x which was unable to be parsed",
- die->GetOffset(),
+ ReportError ("0x%8.8llx: DW_TAG_member refers to type 0x%8.8llx which was unable to be parsed",
+ MakeUserID(die->GetOffset()),
encoding_uid);
}
}
@@ -1371,7 +1377,7 @@
SymbolFileDWARF::GetClangDeclContextContainingTypeUID (lldb::user_id_t type_uid)
{
DWARFDebugInfo* debug_info = DebugInfo();
- if (debug_info)
+ if (debug_info && UserIDMatches(type_uid))
{
DWARFCompileUnitSP cu_sp;
const DWARFDebugInfoEntry* die = debug_info->GetDIEPtr(type_uid, &cu_sp);
@@ -1384,32 +1390,37 @@
clang::DeclContext*
SymbolFileDWARF::GetClangDeclContextForTypeUID (const lldb_private::SymbolContext &sc, lldb::user_id_t type_uid)
{
- return GetClangDeclContextForDIEOffset (sc, type_uid);
+ if (UserIDMatches(type_uid))
+ return GetClangDeclContextForDIEOffset (sc, type_uid);
+ return NULL;
}
Type*
SymbolFileDWARF::ResolveTypeUID (lldb::user_id_t type_uid)
{
- DWARFDebugInfo* debug_info = DebugInfo();
- if (debug_info)
+ if (UserIDMatches(type_uid))
{
- DWARFCompileUnitSP cu_sp;
- const DWARFDebugInfoEntry* type_die = debug_info->GetDIEPtr(type_uid, &cu_sp);
- if (type_die != NULL)
+ DWARFDebugInfo* debug_info = DebugInfo();
+ if (debug_info)
{
- // We might be coming in in the middle of a type tree (a class
- // withing a class, an enum within a class), so parse any needed
- // parent DIEs before we get to this one...
- const DWARFDebugInfoEntry *decl_ctx_die = GetDeclContextDIEContainingDIE (cu_sp.get(), type_die);
- switch (decl_ctx_die->Tag())
+ DWARFCompileUnitSP cu_sp;
+ const DWARFDebugInfoEntry* type_die = debug_info->GetDIEPtr(type_uid, &cu_sp);
+ if (type_die != NULL)
{
- case DW_TAG_structure_type:
- case DW_TAG_union_type:
- case DW_TAG_class_type:
- ResolveType(cu_sp.get(), decl_ctx_die);
- break;
+ // We might be coming in in the middle of a type tree (a class
+ // withing a class, an enum within a class), so parse any needed
+ // parent DIEs before we get to this one...
+ const DWARFDebugInfoEntry *decl_ctx_die = GetDeclContextDIEContainingDIE (cu_sp.get(), type_die);
+ switch (decl_ctx_die->Tag())
+ {
+ case DW_TAG_structure_type:
+ case DW_TAG_union_type:
+ case DW_TAG_class_type:
+ ResolveType(cu_sp.get(), decl_ctx_die);
+ break;
+ }
+ return ResolveType (cu_sp.get(), type_die);
}
- return ResolveType (cu_sp.get(), type_die);
}
}
return NULL;
@@ -1456,8 +1467,8 @@
const dw_tag_t tag = die->Tag();
- DEBUG_PRINTF ("0x%8.8x: %s (\"%s\") - resolve forward declaration...\n",
- die->GetOffset(),
+ DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\") - resolve forward declaration...\n",
+ MakeUserID(die->GetOffset()),
DW_TAG_value_to_name(tag),
type->GetName().AsCString());
assert (clang_type);
@@ -1657,7 +1668,7 @@
// Check if the symbol vendor already knows about this compile unit?
sc.comp_unit = GetCompUnitForDWARFCompUnit(curr_cu, UINT32_MAX);
- sc.function = sc.comp_unit->FindFunctionByUID (func_die->GetOffset()).get();
+ sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(func_die->GetOffset())).get();
if (sc.function == NULL)
sc.function = ParseCompileUnitFunction(sc, curr_cu, func_die);
@@ -1741,7 +1752,7 @@
if (function_die != NULL)
{
- sc.function = sc.comp_unit->FindFunctionByUID (function_die->GetOffset()).get();
+ sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get();
if (sc.function == NULL)
sc.function = ParseCompileUnitFunction(sc, curr_cu, function_die);
}
@@ -1755,9 +1766,9 @@
Block& block = sc.function->GetBlock (true);
if (block_die != NULL)
- sc.block = block.FindBlockByID (block_die->GetOffset());
+ sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
else
- sc.block = block.FindBlockByID (function_die->GetOffset());
+ sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
if (sc.block)
resolved |= eSymbolContextBlock;
}
@@ -1837,7 +1848,7 @@
if (function_die != NULL)
{
- sc.function = sc.comp_unit->FindFunctionByUID (function_die->GetOffset()).get();
+ sc.function = sc.comp_unit->FindFunctionByUID (MakeUserID(function_die->GetOffset())).get();
if (sc.function == NULL)
sc.function = ParseCompileUnitFunction(sc, curr_cu, function_die);
}
@@ -1847,9 +1858,9 @@
Block& block = sc.function->GetBlock (true);
if (block_die != NULL)
- sc.block = block.FindBlockByID (block_die->GetOffset());
+ sc.block = block.FindBlockByID (MakeUserID(block_die->GetOffset()));
else
- sc.block = block.FindBlockByID (function_die->GetOffset());
+ sc.block = block.FindBlockByID (MakeUserID(function_die->GetOffset()));
}
}
}
@@ -2219,7 +2230,7 @@
// Parse all blocks if needed
if (inlined_die)
{
- sc.block = sc.function->GetBlock (true).FindBlockByID (inlined_die->GetOffset());
+ sc.block = sc.function->GetBlock (true).FindBlockByID (MakeUserID(inlined_die->GetOffset()));
assert (sc.block != NULL);
if (sc.block->GetStartAddress (addr) == false)
addr.Clear();
@@ -3319,9 +3330,9 @@
if (log)
{
const char *object_name = m_obj_file->GetModule()->GetObjectName().GetCString();
- log->Printf ("ASTContext => %p: 0x%8.8x: DW_TAG_namespace with DW_AT_name(\"%s\") => clang::NamespaceDecl * %p in %s/%s%s%s%s (original = %p)",
+ log->Printf ("ASTContext => %p: 0x%8.8llx: DW_TAG_namespace with DW_AT_name(\"%s\") => clang::NamespaceDecl * %p in %s/%s%s%s%s (original = %p)",
GetClangASTContext().getASTContext(),
- die->GetOffset(),
+ MakeUserID(die->GetOffset()),
namespace_name,
namespace_decl,
m_obj_file->GetFileSpec().GetDirectory().GetCString(),
@@ -3529,12 +3540,12 @@
Type *resolved_type = ResolveType (type_cu, type_die, false);
if (resolved_type && resolved_type != DIE_IS_BEING_PARSED)
{
- DEBUG_PRINTF ("resolved 0x%8.8x (cu 0x%8.8x) from %s to 0x%8.8x (cu 0x%8.8x)\n",
- die->GetOffset(),
- curr_cu->GetOffset(),
+ DEBUG_PRINTF ("resolved 0x%8.8llx (cu 0x%8.8llx) from %s to 0x%8.8llx (cu 0x%8.8llx)\n",
+ MakeUserID(die->GetOffset()),
+ MakeUserID(curr_cu->GetOffset()),
m_obj_file->GetFileSpec().GetFilename().AsCString(),
- type_die->GetOffset(),
- type_cu->GetOffset());
+ MakeUserID(type_die->GetOffset()),
+ MakeUserID(type_cu->GetOffset()));
m_die_to_type[die] = resolved_type;
type_sp = resolved_type;
@@ -3646,7 +3657,7 @@
}
}
- DEBUG_PRINTF ("0x%8.8x: %s (\"%s\") type => 0x%8.8x\n", die->GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr, encoding_uid);
+ DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\") type => 0x%8.8x\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr, encoding_uid);
switch (tag)
{
@@ -3693,7 +3704,7 @@
}
}
- type_sp.reset( new Type (die->GetOffset(),
+ type_sp.reset( new Type (MakeUserID(die->GetOffset()),
this,
type_name_const_str,
byte_size,
@@ -3811,7 +3822,7 @@
}
}
- DEBUG_PRINTF ("0x%8.8x: %s (\"%s\")\n", die->GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
int tag_decl_kind = -1;
AccessType default_accessibility = eAccessNone;
@@ -3875,7 +3886,7 @@
// parameters in any class methods need it for the clang
// types for function prototypes.
LinkDeclContextToDIE(ClangASTContext::GetDeclContextForType(clang_type), die);
- type_sp.reset (new Type (die->GetOffset(),
+ type_sp.reset (new Type (MakeUserID(die->GetOffset()),
this,
type_name_const_str,
byte_size,
@@ -3965,7 +3976,7 @@
}
}
- DEBUG_PRINTF ("0x%8.8x: %s (\"%s\")\n", die->GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
clang_type_t enumerator_clang_type = NULL;
clang_type = m_forward_decl_die_to_clang_type.lookup (die);
@@ -3987,7 +3998,7 @@
LinkDeclContextToDIE(ClangASTContext::GetDeclContextForType(clang_type), die);
- type_sp.reset( new Type (die->GetOffset(),
+ type_sp.reset( new Type (MakeUserID(die->GetOffset()),
this,
type_name_const_str,
byte_size,
@@ -4108,7 +4119,7 @@
}
}
- DEBUG_PRINTF ("0x%8.8x: %s (\"%s\")\n", die->GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
clang_type_t return_clang_type = NULL;
Type *func_type = NULL;
@@ -4236,8 +4247,8 @@
}
else
{
- ReportWarning ("0x%8.8x: DW_AT_specification(0x%8.8x) has no decl\n",
- die->GetOffset(),
+ ReportWarning ("0x%8.8llx: DW_AT_specification(0x%8.8x) has no decl\n",
+ MakeUserID(die->GetOffset()),
specification_die_offset);
}
type_handled = true;
@@ -4259,8 +4270,8 @@
}
else
{
- ReportWarning ("0x%8.8x: DW_AT_abstract_origin(0x%8.8x) has no decl\n",
- die->GetOffset(),
+ ReportWarning ("0x%8.8llx: DW_AT_abstract_origin(0x%8.8x) has no decl\n",
+ MakeUserID(die->GetOffset()),
abstract_origin_die_offset);
}
type_handled = true;
@@ -4288,10 +4299,10 @@
{
clang::CXXMethodDecl *cxx_method_decl;
// REMOVE THE CRASH DESCRIPTION BELOW
- Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8x from %s/%s",
+ Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8llx from %s/%s",
type_name_cstr,
class_type->GetName().GetCString(),
- die->GetOffset(),
+ MakeUserID(die->GetOffset()),
m_obj_file->GetFileSpec().GetDirectory().GetCString(),
m_obj_file->GetFileSpec().GetFilename().GetCString());
@@ -4356,7 +4367,7 @@
function_param_decls.size());
}
}
- type_sp.reset( new Type (die->GetOffset(),
+ type_sp.reset( new Type (MakeUserID(die->GetOffset()),
this,
type_name_const_str,
0,
@@ -4421,7 +4432,7 @@
}
}
- DEBUG_PRINTF ("0x%8.8x: %s (\"%s\")\n", die->GetOffset(), DW_TAG_value_to_name(tag), type_name_cstr);
+ DEBUG_PRINTF ("0x%8.8llx: %s (\"%s\")\n", MakeUserID(die->GetOffset()), DW_TAG_value_to_name(tag), type_name_cstr);
Type *element_type = ResolveTypeUID(type_die_offset);
@@ -4449,7 +4460,7 @@
array_element_bit_stride = array_element_bit_stride * num_elements;
}
ConstString empty_name;
- type_sp.reset( new Type (die->GetOffset(),
+ type_sp.reset( new Type (MakeUserID(die->GetOffset()),
this,
empty_name,
array_element_bit_stride / 8,
@@ -4502,7 +4513,7 @@
byte_size = ClangASTType::GetClangTypeBitWidth (ast.getASTContext(),
clang_type) / 8;
- type_sp.reset( new Type (die->GetOffset(),
+ type_sp.reset( new Type (MakeUserID(die->GetOffset()),
this,
type_name_const_str,
byte_size,
@@ -4533,7 +4544,7 @@
}
else if (sc.function != NULL)
{
- symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(sc_parent_die->GetOffset());
+ symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset()));
if (symbol_context_scope == NULL)
symbol_context_scope = sc.function;
}
@@ -4582,7 +4593,7 @@
if (die->Tag() == DW_TAG_subprogram)
{
SymbolContext child_sc(sc);
- child_sc.function = sc.comp_unit->FindFunctionByUID(die->GetOffset()).get();
+ child_sc.function = sc.comp_unit->FindFunctionByUID(MakeUserID(die->GetOffset())).get();
types_added += ParseTypes(child_sc, dwarf_cu, die->GetFirstChild(), true, true);
}
else
@@ -4854,7 +4865,7 @@
case DW_TAG_lexical_block:
if (sc.function)
{
- symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(sc_parent_die->GetOffset());
+ symbol_context_scope = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset()));
if (symbol_context_scope == NULL)
symbol_context_scope = sc.function;
}
@@ -4867,16 +4878,16 @@
if (symbol_context_scope)
{
- var_sp.reset (new Variable(die->GetOffset(),
- name,
- mangled,
- var_type,
- scope,
- symbol_context_scope,
- &decl,
- location,
- is_external,
- is_artificial));
+ var_sp.reset (new Variable (MakeUserID(die->GetOffset()),
+ name,
+ mangled,
+ var_type,
+ scope,
+ symbol_context_scope,
+ &decl,
+ location,
+ is_external,
+ is_artificial));
var_sp->SetLocationIsConstantValueData (location_is_const_value_data);
}
@@ -5020,11 +5031,11 @@
}
else
{
- ReportError ("parent 0x%8.8x %s with no valid compile unit in symbol context for 0x%8.8x %s.\n",
- sc_parent_die->GetOffset(),
- DW_TAG_value_to_name (parent_tag),
- orig_die->GetOffset(),
- DW_TAG_value_to_name (orig_die->Tag()));
+ ReportError ("parent 0x%8.8llx %s with no valid compile unit in symbol context for 0x%8.8llx %s.\n",
+ MakeUserID(sc_parent_die->GetOffset()),
+ DW_TAG_value_to_name (parent_tag),
+ MakeUserID(orig_die->GetOffset()),
+ DW_TAG_value_to_name (orig_die->Tag()));
}
break;
@@ -5035,7 +5046,7 @@
{
// Check to see if we already have parsed the variables for the given scope
- Block *block = sc.function->GetBlock(true).FindBlockByID(sc_parent_die->GetOffset());
+ Block *block = sc.function->GetBlock(true).FindBlockByID(MakeUserID(sc_parent_die->GetOffset()));
if (block == NULL)
{
// This must be a specification or abstract origin with
@@ -5047,7 +5058,7 @@
sc_parent_die->GetOffset(),
&concrete_block_die_cu);
if (concrete_block_die)
- block = sc.function->GetBlock(true).FindBlockByID(concrete_block_die->GetOffset());
+ block = sc.function->GetBlock(true).FindBlockByID(MakeUserID(concrete_block_die->GetOffset()));
}
if (block != NULL)
@@ -5064,9 +5075,9 @@
break;
default:
- ReportError ("didn't find appropriate parent DIE for variable list for 0x%8.8x %s.\n",
- orig_die->GetOffset(),
- DW_TAG_value_to_name (orig_die->Tag()));
+ ReportError ("didn't find appropriate parent DIE for variable list for 0x%8.8llx %s.\n",
+ MakeUserID(orig_die->GetOffset()),
+ DW_TAG_value_to_name (orig_die->Tag()));
break;
}
}
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Wed Oct 19 13:09:39 2011
@@ -55,7 +55,7 @@
class DWARFFormValue;
class SymbolFileDWARFDebugMap;
-class SymbolFileDWARF : public lldb_private::SymbolFile
+class SymbolFileDWARF : public lldb_private::SymbolFile, public lldb_private::UserID
{
public:
friend class SymbolFileDWARFDebugMap;
@@ -411,6 +411,21 @@
m_decl_ctx_to_die[decl_ctx].insert(die);
}
+ bool
+ UserIDMatches (lldb::user_id_t uid) const
+ {
+ const lldb::user_id_t high_uid = uid & 0xffffffff00000000ull;
+ if (high_uid)
+ return high_uid == GetID();
+ return true;
+ }
+
+ lldb::user_id_t
+ MakeUserID (dw_offset_t die_offset) const
+ {
+ return GetID() | die_offset;
+ }
+
void
ReportError (const char *format, ...) __attribute__ ((format (printf, 2, 3)));
void
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Wed Oct 19 13:09:39 2011
@@ -231,6 +231,20 @@
return NULL;
}
+
+uint32_t
+SymbolFileDWARFDebugMap::GetCompUnitInfoIndex (const CompileUnitInfo *comp_unit_info)
+{
+ if (!m_compile_unit_infos.empty())
+ {
+ const CompileUnitInfo *first_comp_unit_info = &m_compile_unit_infos.front();
+ const CompileUnitInfo *last_comp_unit_info = &m_compile_unit_infos.back();
+ if (first_comp_unit_info <= comp_unit_info && comp_unit_info <= last_comp_unit_info)
+ return comp_unit_info - first_comp_unit_info;
+ }
+ return UINT32_MAX;
+}
+
SymbolFileDWARF *
SymbolFileDWARFDebugMap::GetSymbolFileByOSOIndex (uint32_t oso_idx)
{
@@ -256,7 +270,12 @@
// Set a a pointer to this class to set our OSO DWARF file know
// that the DWARF is being used along with a debug map and that
// it will have the remapped sections that we do below.
- ((SymbolFileDWARF *)comp_unit_info->oso_symbol_vendor->GetSymbolFile())->SetDebugMapSymfile(this);
+ SymbolFileDWARF *oso_symfile = (SymbolFileDWARF *)comp_unit_info->oso_symbol_vendor->GetSymbolFile();
+ oso_symfile->SetDebugMapSymfile(this);
+ // Set the ID of the symbol file DWARF to the index of the OSO
+ // shifted left by 32 bits to provide a unique prefix for any
+ // UserID's that get created in the symbol file.
+ oso_symfile->SetID (((uint64_t)GetCompUnitInfoIndex(comp_unit_info) + 1ull) << 32ull);
comp_unit_info->debug_map_sections_sp.reset(new SectionList);
Symtab *exe_symtab = m_obj_file->GetSymtab();
@@ -622,11 +641,15 @@
Type*
SymbolFileDWARFDebugMap::ResolveTypeUID(lldb::user_id_t type_uid)
{
+ const uint64_t oso_idx = GetOSOIndexFromUserID (type_uid);
+ SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx);
+ if (oso_dwarf)
+ oso_dwarf->ResolveTypeUID (type_uid);
return NULL;
}
lldb::clang_type_t
-SymbolFileDWARFDebugMap::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_Type)
+SymbolFileDWARFDebugMap::ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_type)
{
// We have a struct/union/class/enum that needs to be fully resolved.
return NULL;
@@ -1149,3 +1172,24 @@
}
}
+clang::DeclContext*
+SymbolFileDWARFDebugMap::GetClangDeclContextContainingTypeUID (lldb::user_id_t type_uid)
+{
+ const uint64_t oso_idx = GetOSOIndexFromUserID (type_uid);
+ SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx);
+ if (oso_dwarf)
+ return oso_dwarf->GetClangDeclContextContainingTypeUID (type_uid);
+ return NULL;
+}
+
+clang::DeclContext*
+SymbolFileDWARFDebugMap::GetClangDeclContextForTypeUID (const lldb_private::SymbolContext &sc, lldb::user_id_t type_uid)
+{
+ const uint64_t oso_idx = GetOSOIndexFromUserID (type_uid);
+ SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex (oso_idx);
+ if (oso_dwarf)
+ return oso_dwarf->GetClangDeclContextForTypeUID (sc, type_uid);
+ return NULL;
+}
+
+
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Wed Oct 19 13:09:39 2011
@@ -66,6 +66,8 @@
virtual size_t ParseVariablesForContext (const lldb_private::SymbolContext& sc);
virtual lldb_private::Type* ResolveTypeUID (lldb::user_id_t type_uid);
+ virtual clang::DeclContext* GetClangDeclContextContainingTypeUID (lldb::user_id_t type_uid);
+ virtual clang::DeclContext* GetClangDeclContextForTypeUID (const lldb_private::SymbolContext &sc, lldb::user_id_t type_uid);
virtual lldb::clang_type_t ResolveClangOpaqueTypeDefinition (lldb::clang_type_t clang_Type);
virtual uint32_t ResolveSymbolContext (const lldb_private::Address& so_addr, uint32_t resolve_scope, lldb_private::SymbolContext& sc);
virtual uint32_t ResolveSymbolContext (const lldb_private::FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, lldb_private::SymbolContextList& sc_list);
@@ -151,6 +153,11 @@
void
InitOSO ();
+ static uint32_t
+ GetOSOIndexFromUserID (lldb::user_id_t uid)
+ {
+ return (uint32_t)((uid >> 32ull) - 1ull);
+ }
bool
GetFileSpecForSO (uint32_t oso_idx, lldb_private::FileSpec &file_spec);
@@ -169,6 +176,9 @@
lldb_private::ObjectFile *
GetObjectFileByOSOIndex (uint32_t oso_idx);
+ uint32_t
+ GetCompUnitInfoIndex (const CompileUnitInfo *comp_unit_info);
+
SymbolFileDWARF *
GetSymbolFile (const lldb_private::SymbolContext& sc);
Modified: lldb/trunk/source/Symbol/Block.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Block.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Block.cpp (original)
+++ lldb/trunk/source/Symbol/Block.cpp Wed Oct 19 13:09:39 2011
@@ -89,7 +89,7 @@
const Block* parent_block = GetParent();
if (parent_block)
{
- s->Printf(", parent = {0x%8.8x}", parent_block->GetID());
+ s->Printf(", parent = {0x%8.8llx}", parent_block->GetID());
}
if (m_inlineInfoSP.get() != NULL)
{
@@ -194,7 +194,7 @@
Function *function = CalculateSymbolContextFunction();
if (function)
function->DumpSymbolContext(s);
- s->Printf(", Block{0x%8.8x}", GetID());
+ s->Printf(", Block{0x%8.8llx}", GetID());
}
void
@@ -398,7 +398,7 @@
const Declaration &func_decl = func_type->GetDeclaration();
if (func_decl.GetLine())
{
- log->Printf ("warning: %s/%s:%u block {0x%8.8x} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8x} in function {0x%8.8x} from %s/%s",
+ log->Printf ("warning: %s/%s:%u block {0x%8.8llx} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8llx} in function {0x%8.8llx} from %s/%s",
func_decl.GetFile().GetDirectory().GetCString(),
func_decl.GetFile().GetFilename().GetCString(),
func_decl.GetLine(),
@@ -413,7 +413,7 @@
}
else
{
- log->Printf ("warning: block {0x%8.8x} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8x} in function {0x%8.8x} from %s/%s",
+ log->Printf ("warning: block {0x%8.8llx} has range[%u] [0x%llx - 0x%llx) which is not contained in parent block {0x%8.8llx} in function {0x%8.8llx} from %s/%s",
GetID(),
(uint32_t)m_ranges.GetSize(),
block_start_addr,
Modified: lldb/trunk/source/Symbol/CompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompileUnit.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompileUnit.cpp (original)
+++ lldb/trunk/source/Symbol/CompileUnit.cpp Wed Oct 19 13:09:39 2011
@@ -73,7 +73,7 @@
CompileUnit::DumpSymbolContext(Stream *s)
{
GetModule()->DumpSymbolContext(s);
- s->Printf(", CompileUnit{0x%8.8x}", GetID());
+ s->Printf(", CompileUnit{0x%8.8llx}", GetID());
}
Modified: lldb/trunk/source/Symbol/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Function.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Function.cpp (original)
+++ lldb/trunk/source/Symbol/Function.cpp Wed Oct 19 13:09:39 2011
@@ -367,7 +367,7 @@
}
else if (m_type_uid != LLDB_INVALID_UID)
{
- s->Printf(", type_uid = 0x%8.8x", m_type_uid);
+ s->Printf(", type_uid = 0x%8.8llx", m_type_uid);
}
s->EOL();
@@ -423,7 +423,7 @@
Function::DumpSymbolContext(Stream *s)
{
m_comp_unit->DumpSymbolContext(s);
- s->Printf(", Function{0x%8.8x}", GetID());
+ s->Printf(", Function{0x%8.8llx}", GetID());
}
size_t
Modified: lldb/trunk/source/Symbol/Symbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symbol.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symbol.cpp (original)
+++ lldb/trunk/source/Symbol/Symbol.cpp Wed Oct 19 13:09:39 2011
@@ -20,8 +20,8 @@
Symbol::Symbol() :
- UserID (),
SymbolContextScope (),
+ m_uid (UINT32_MAX),
m_mangled (),
m_type (eSymbolTypeInvalid),
m_type_data (0),
@@ -39,7 +39,7 @@
Symbol::Symbol
(
- user_id_t symID,
+ uint32_t symID,
const char *name,
bool name_is_mangled,
SymbolType type,
@@ -52,8 +52,8 @@
uint32_t size,
uint32_t flags
) :
- UserID (symID),
SymbolContextScope (),
+ m_uid (symID),
m_mangled (name, name_is_mangled),
m_type (type),
m_type_data (0),
@@ -71,7 +71,7 @@
Symbol::Symbol
(
- user_id_t symID,
+ uint32_t symID,
const char *name,
bool name_is_mangled,
SymbolType type,
@@ -82,8 +82,8 @@
const AddressRange &range,
uint32_t flags
) :
- UserID (symID),
SymbolContextScope (),
+ m_uid (symID),
m_mangled (name, name_is_mangled),
m_type (type),
m_type_data (0),
@@ -100,8 +100,8 @@
}
Symbol::Symbol(const Symbol& rhs):
- UserID (rhs),
SymbolContextScope (rhs),
+ m_uid (rhs.m_uid),
m_mangled (rhs.m_mangled),
m_type (rhs.m_type),
m_type_data (rhs.m_type_data),
@@ -123,7 +123,7 @@
if (this != &rhs)
{
SymbolContextScope::operator= (rhs);
- UserID::operator= (rhs);
+ m_uid = rhs.m_uid;
m_mangled = rhs.m_mangled;
m_type = rhs.m_type;
m_type_data = rhs.m_type_data;
@@ -140,6 +140,24 @@
return *this;
}
+void
+Symbol::Clear()
+{
+ m_uid = UINT32_MAX;
+ m_mangled.Clear();
+ m_type = eSymbolTypeInvalid;
+ m_type_data = 0;
+ m_type_data_resolved = false;
+ m_is_synthetic = false;
+ m_is_debug = false;
+ m_is_external = false;
+ m_size_is_sibling = false;
+ m_size_is_synthesized = false;
+ m_searched_for_function = false;
+ m_addr_range.Clear();
+ m_flags = 0;
+}
+
AddressRange *
Symbol::GetAddressRangePtr()
{
Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Wed Oct 19 13:09:39 2011
@@ -500,7 +500,7 @@
if (log)
{
- log->Printf ("warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx",
+ log->Printf ("warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx",
curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress());
}
#ifdef LLDB_CONFIGURATION_DEBUG
@@ -519,7 +519,7 @@
}
if (objfile)
{
- fprintf (stderr, "warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx in %s/%s\n",
+ fprintf (stderr, "warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx in %s/%s\n",
curr_inlined_block->GetID(),
curr_frame_pc.GetFileAddress(),
objfile->GetFileSpec().GetDirectory().GetCString(),
@@ -527,7 +527,7 @@
}
else
{
- fprintf (stderr, "warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx\n",
+ fprintf (stderr, "warning: inlined block 0x%8.8llx doesn't have a range that contains file address 0x%llx\n",
curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress());
}
}
Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Wed Oct 19 13:09:39 2011
@@ -228,7 +228,7 @@
{
s->PutChar('(');
if (verbose)
- s->Printf("Type{0x%8.8x} ", GetID());
+ s->Printf("Type{0x%8.8llx} ", GetID());
DumpTypeName (s);
s->PutCString(") ");
}
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Wed Oct 19 13:09:39 2011
@@ -1340,7 +1340,7 @@
}
else
{
- error.SetErrorStringWithFormat("invalid breakpoint site ID: %i", break_id);
+ error.SetErrorStringWithFormat("invalid breakpoint site ID: %llu", break_id);
}
return error;
@@ -1358,7 +1358,7 @@
}
else
{
- error.SetErrorStringWithFormat("invalid breakpoint site ID: %i", break_id);
+ error.SetErrorStringWithFormat("invalid breakpoint site ID: %llu", break_id);
}
return error;
}
@@ -1540,7 +1540,7 @@
addr_t bp_addr = bp_site->GetLoadAddress();
lldb::user_id_t breakID = bp_site->GetID();
if (log)
- log->Printf ("Process::DisableBreakpoint (breakID = %d) addr = 0x%llx", breakID, (uint64_t)bp_addr);
+ log->Printf ("Process::DisableBreakpoint (breakID = %llu) addr = 0x%llx", breakID, (uint64_t)bp_addr);
if (bp_site->IsHardware())
{
@@ -2718,7 +2718,7 @@
// Create a thread that watches our internal state and controls which
// events make it to clients (into the DCProcess event queue).
char thread_name[1024];
- snprintf(thread_name, sizeof(thread_name), "<lldb.process.internal-state(pid=%i)>", GetID());
+ snprintf(thread_name, sizeof(thread_name), "<lldb.process.internal-state(pid=%llu)>", GetID());
m_private_state_thread = Host::ThreadCreate (thread_name, Process::PrivateStateThread, this, NULL);
return IS_VALID_LLDB_HOST_THREAD(m_private_state_thread);
}
@@ -2823,7 +2823,7 @@
{
if (log)
{
- log->Printf ("Process::%s (pid = %i) broadcasting new state %s (old state %s) to %s",
+ log->Printf ("Process::%s (pid = %llu) broadcasting new state %s (old state %s) to %s",
__FUNCTION__,
GetID(),
StateAsCString(new_state),
@@ -2842,7 +2842,7 @@
{
if (log)
{
- log->Printf ("Process::%s (pid = %i) suppressing state %s (old state %s): should_broadcast == false",
+ log->Printf ("Process::%s (pid = %llu) suppressing state %s (old state %s): should_broadcast == false",
__FUNCTION__,
GetID(),
StateAsCString(new_state),
@@ -2867,7 +2867,7 @@
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %i) thread starting...", __FUNCTION__, this, GetID());
+ log->Printf ("Process::%s (arg = %p, pid = %llu) thread starting...", __FUNCTION__, this, GetID());
bool exit_now = false;
while (!exit_now)
@@ -2893,7 +2893,7 @@
}
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %i) got a control event: %d", __FUNCTION__, this, GetID(), event_sp->GetType());
+ log->Printf ("Process::%s (arg = %p, pid = %llu) got a control event: %d", __FUNCTION__, this, GetID(), event_sp->GetType());
m_private_state_control_wait.SetValue (true, eBroadcastAlways);
continue;
@@ -2912,7 +2912,7 @@
internal_state == eStateDetached )
{
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %i) about to exit with internal state %s...", __FUNCTION__, this, GetID(), StateAsCString(internal_state));
+ log->Printf ("Process::%s (arg = %p, pid = %llu) about to exit with internal state %s...", __FUNCTION__, this, GetID(), StateAsCString(internal_state));
break;
}
@@ -2920,7 +2920,7 @@
// Verify log is still enabled before attempting to write to it...
if (log)
- log->Printf ("Process::%s (arg = %p, pid = %i) thread exiting...", __FUNCTION__, this, GetID());
+ log->Printf ("Process::%s (arg = %p, pid = %llu) thread exiting...", __FUNCTION__, this, GetID());
m_private_state_control_wait.SetValue (true, eBroadcastAlways);
m_private_state_thread = LLDB_INVALID_HOST_THREAD;
@@ -3043,7 +3043,7 @@
Process::ProcessEventData::Dump (Stream *s) const
{
if (m_process_sp)
- s->Printf(" process = %p (pid = %u), ", m_process_sp.get(), m_process_sp->GetID());
+ s->Printf(" process = %p (pid = %llu), ", m_process_sp.get(), m_process_sp->GetID());
s->Printf("state = %s", StateAsCString(GetState()));
}
@@ -3433,7 +3433,7 @@
{
StreamString s;
thread_plan_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
- log->Printf ("Process::RunThreadPlan(): Resuming thread %u - 0x%4.4x to run thread plan \"%s\".",
+ log->Printf ("Process::RunThreadPlan(): Resuming thread %u - 0x%4.4llx to run thread plan \"%s\".",
thread->GetIndexID(),
thread->GetID(),
s.GetData());
@@ -3830,7 +3830,7 @@
continue;
}
- ts.Printf("<0x%4.4x ", thread->GetID());
+ ts.Printf("<0x%4.4llx ", thread->GetID());
RegisterContext *register_context = thread->GetRegisterContext().get();
if (register_context)
@@ -3967,7 +3967,7 @@
{
int exit_status = GetExitStatus();
const char *exit_description = GetExitDescription();
- strm.Printf ("Process %d exited with status = %i (0x%8.8x) %s\n",
+ strm.Printf ("Process %llu exited with status = %i (0x%8.8x) %s\n",
GetID(),
exit_status,
exit_status,
@@ -3978,12 +3978,12 @@
if (state == eStateConnected)
strm.Printf ("Connected to remote target.\n");
else
- strm.Printf ("Process %d %s\n", GetID(), StateAsCString (state));
+ strm.Printf ("Process %llu %s\n", GetID(), StateAsCString (state));
}
}
else
{
- strm.Printf ("Process %d is running.\n", GetID());
+ strm.Printf ("Process %llu is running.\n", GetID());
}
}
Modified: lldb/trunk/source/Target/StackID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackID.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackID.cpp (original)
+++ lldb/trunk/source/Target/StackID.cpp Wed Oct 19 13:09:39 2011
@@ -31,7 +31,7 @@
m_symbol_scope->CalculateSymbolContext (&sc);
if (sc.block)
- s->Printf(" (Block {0x%8.8x})", sc.block->GetID());
+ s->Printf(" (Block {0x%8.8llx})", sc.block->GetID());
else if (sc.symbol)
s->Printf(" (Symbol{0x%8.8x})", sc.symbol->GetID());
}
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Wed Oct 19 13:09:39 2011
@@ -1736,7 +1736,7 @@
}
if (print_hook_header && !any_thread_matched)
{
- result.AppendMessageWithFormat("\n- Hook %d\n", cur_hook_sp->GetID());
+ result.AppendMessageWithFormat("\n- Hook %llu\n", cur_hook_sp->GetID());
any_thread_matched = true;
}
@@ -1760,7 +1760,7 @@
if ((result.GetStatus() == eReturnStatusSuccessContinuingNoResult) ||
(result.GetStatus() == eReturnStatusSuccessContinuingResult))
{
- result.AppendMessageWithFormat ("Aborting stop hooks, hook %d set the program running.", cur_hook_sp->GetID());
+ result.AppendMessageWithFormat ("Aborting stop hooks, hook %llu set the program running.", cur_hook_sp->GetID());
keep_going = false;
}
}
@@ -1857,7 +1857,7 @@
s->SetIndentLevel(indent_level + 2);
- s->Printf ("Hook: %d\n", GetID());
+ s->Printf ("Hook: %llu\n", GetID());
if (m_active)
s->Indent ("State: enabled\n");
else
Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Wed Oct 19 13:09:39 2011
@@ -65,7 +65,7 @@
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
- log->Printf ("%p Thread::Thread(tid = 0x%4.4x)", this, GetID());
+ log->Printf ("%p Thread::Thread(tid = 0x%4.4llx)", this, GetID());
QueueFundamentalPlan(true);
UpdateInstanceName();
@@ -76,7 +76,7 @@
{
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT));
if (log)
- log->Printf ("%p Thread::~Thread(tid = 0x%4.4x)", this, GetID());
+ log->Printf ("%p Thread::~Thread(tid = 0x%4.4llx)", this, GetID());
/// If you hit this assert, it means your derived class forgot to call DoDestroy in its destructor.
assert (m_destroy_called);
}
@@ -373,7 +373,7 @@
if (thread_state == eStateSuspended || thread_state == eStateInvalid)
{
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4x: returning vote %i (state was suspended or invalid)\n", GetID(), eVoteNoOpinion);
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote %i (state was suspended or invalid)\n", GetID(), eVoteNoOpinion);
return eVoteNoOpinion;
}
@@ -381,13 +381,13 @@
{
// Don't use GetCompletedPlan here, since that suppresses private plans.
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4x: returning vote for complete stack's back plan\n", GetID());
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote for complete stack's back plan\n", GetID());
return m_completed_plan_stack.back()->ShouldReportStop (event_ptr);
}
else
{
if (log)
- log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4x: returning vote for current plan\n", GetID());
+ log->Printf ("Thread::ShouldReportStop() tid = 0x%4.4llx: returning vote for current plan\n", GetID());
return GetCurrentPlan()->ShouldReportStop (event_ptr);
}
}
@@ -408,7 +408,7 @@
{
// Don't use GetCompletedPlan here, since that suppresses private plans.
if (log)
- log->Printf ("Current Plan for thread %d (0x%4.4x): %s being asked whether we should report run.",
+ log->Printf ("Current Plan for thread %d (0x%4.4llx): %s being asked whether we should report run.",
GetIndexID(),
GetID(),
m_completed_plan_stack.back()->GetName());
@@ -418,7 +418,7 @@
else
{
if (log)
- log->Printf ("Current Plan for thread %d (0x%4.4x): %s being asked whether we should report run.",
+ log->Printf ("Current Plan for thread %d (0x%4.4llx): %s being asked whether we should report run.",
GetIndexID(),
GetID(),
GetCurrentPlan()->GetName());
@@ -453,7 +453,7 @@
{
StreamString s;
thread_plan_sp->GetDescription (&s, lldb::eDescriptionLevelFull);
- log->Printf("Pushing plan: \"%s\", tid = 0x%4.4x.",
+ log->Printf("Pushing plan: \"%s\", tid = 0x%4.4llx.",
s.GetData(),
thread_plan_sp->GetThread().GetID());
}
@@ -472,7 +472,7 @@
ThreadPlanSP &plan = m_plan_stack.back();
if (log)
{
- log->Printf("Popping plan: \"%s\", tid = 0x%4.4x.", plan->GetName(), plan->GetThread().GetID());
+ log->Printf("Popping plan: \"%s\", tid = 0x%4.4llx.", plan->GetName(), plan->GetThread().GetID());
}
m_completed_plan_stack.push_back (plan);
plan->WillPop();
@@ -614,7 +614,7 @@
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
{
- log->Printf("Discarding thread plans for thread tid = 0x%4.4x, up to %p", GetID(), up_to_plan_sp.get());
+ log->Printf("Discarding thread plans for thread tid = 0x%4.4llx, up to %p", GetID(), up_to_plan_sp.get());
}
int stack_size = m_plan_stack.size();
@@ -655,7 +655,7 @@
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
if (log)
{
- log->Printf("Discarding thread plans for thread (tid = 0x%4.4x, force %d)", GetID(), force);
+ log->Printf("Discarding thread plans for thread (tid = 0x%4.4llx, force %d)", GetID(), force);
}
if (force)
@@ -864,7 +864,7 @@
uint32_t stack_size = m_plan_stack.size();
int i;
s->Indent();
- s->Printf ("Plan Stack for thread #%u: tid = 0x%4.4x, stack_size = %d\n", GetIndexID(), GetID(), stack_size);
+ s->Printf ("Plan Stack for thread #%u: tid = 0x%4.4llx, stack_size = %d\n", GetIndexID(), GetID(), stack_size);
for (i = stack_size - 1; i >= 0; i--)
{
s->IndentMore();
Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Wed Oct 19 13:09:39 2011
@@ -202,7 +202,7 @@
if (thread_sp->GetResumeState () == eStateSuspended)
{
if (log)
- log->Printf ("ThreadList::%s for tid = 0x%4.4x, pc = 0x%16.16llx, should_stop = 0 (ignore since thread was suspended)",
+ log->Printf ("ThreadList::%s for tid = 0x%4.4llx, pc = 0x%16.16llx, should_stop = 0 (ignore since thread was suspended)",
__FUNCTION__,
thread_sp->GetID (),
thread_sp->GetRegisterContext()->GetPC());
@@ -212,7 +212,7 @@
if (thread_sp->ThreadStoppedForAReason() == false)
{
if (log)
- log->Printf ("ThreadList::%s for tid = 0x%4.4x, pc = 0x%16.16llx, should_stop = 0 (ignore since no stop reason)",
+ log->Printf ("ThreadList::%s for tid = 0x%4.4llx, pc = 0x%16.16llx, should_stop = 0 (ignore since no stop reason)",
__FUNCTION__,
thread_sp->GetID (),
thread_sp->GetRegisterContext()->GetPC());
@@ -220,7 +220,7 @@
}
if (log)
- log->Printf ("ThreadList::%s for tid = 0x%4.4x, pc = 0x%16.16llx",
+ log->Printf ("ThreadList::%s for tid = 0x%4.4llx, pc = 0x%16.16llx",
__FUNCTION__,
thread_sp->GetID (),
thread_sp->GetRegisterContext()->GetPC());
@@ -267,7 +267,7 @@
{
const Vote vote = thread_sp->ShouldReportStop (event_ptr);
if (log)
- log->Printf ("ThreadList::%s thread 0x%4.4x: pc = 0x%16.16llx, vote = %s",
+ log->Printf ("ThreadList::%s thread 0x%4.4llx: pc = 0x%16.16llx, vote = %s",
__FUNCTION__,
thread_sp->GetID (),
thread_sp->GetRegisterContext()->GetPC(),
@@ -289,7 +289,7 @@
else
{
if (log)
- log->Printf ("ThreadList::%s thread 0x%4.4x: pc = 0x%16.16llx voted %s, but lost out because result was %s",
+ log->Printf ("ThreadList::%s thread 0x%4.4llx: pc = 0x%16.16llx voted %s, but lost out because result was %s",
__FUNCTION__,
thread_sp->GetID (),
thread_sp->GetRegisterContext()->GetPC(),
@@ -334,7 +334,7 @@
break;
case eVoteNo:
if (log)
- log->Printf ("ThreadList::ShouldReportRun() thread %d (0x%4.4x) says don't report.",
+ log->Printf ("ThreadList::ShouldReportRun() thread %d (0x%4.4llx) says don't report.",
(*pos)->GetIndexID(),
(*pos)->GetID());
result = eVoteNo;
Modified: lldb/trunk/source/Target/ThreadPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlan.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlan.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlan.cpp Wed Oct 19 13:09:39 2011
@@ -153,7 +153,7 @@
addr_t pc = reg_ctx->GetPC();
addr_t sp = reg_ctx->GetSP();
addr_t fp = reg_ctx->GetFP();
- log->Printf("%s Thread #%u: tid = 0x%4.4x, pc = 0x%8.8llx, sp = 0x%8.8llx, fp = 0x%8.8llx, plan = '%s', state = %s, stop others = %d",
+ log->Printf("%s Thread #%u: tid = 0x%4.4llx, pc = 0x%8.8llx, sp = 0x%8.8llx, fp = 0x%8.8llx, plan = '%s', state = %s, stop others = %d",
__FUNCTION__,
m_thread.GetIndexID(),
m_thread.GetID(),
Modified: lldb/trunk/source/Target/ThreadPlanBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanBase.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanBase.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanBase.cpp Wed Oct 19 13:09:39 2011
@@ -106,7 +106,7 @@
// at this point. Don't force the discard, however, so Master plans can stay
// in place if they want to.
if (log)
- log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4x (breakpoint hit.)", m_thread.GetID());
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4llx (breakpoint hit.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
}
@@ -134,7 +134,7 @@
// If we crashed, discard thread plans and stop. Don't force the discard, however,
// since on rerun the target may clean up this exception and continue normally from there.
if (log)
- log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4x (exception.)", m_thread.GetID());
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4llx (exception.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
@@ -142,7 +142,7 @@
if (stop_info_sp->ShouldStop(event_ptr))
{
if (log)
- log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4x (signal.)", m_thread.GetID());
+ log->Printf("Base plan discarding thread plans for thread tid = 0x%4.4llx (signal.)", m_thread.GetID());
m_thread.DiscardThreadPlans(false);
return true;
}
Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Wed Oct 19 13:09:39 2011
@@ -292,7 +292,7 @@
abi->GetReturnValue(m_thread, *m_return_value_sp);
}
if (log)
- log->Printf ("DoTakedown called for thread 0x%4.4x, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
+ log->Printf ("DoTakedown called for thread 0x%4.4llx, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
m_takedown_done = true;
m_real_stop_info_sp = GetPrivateStopReason();
m_thread.RestoreThreadStateFromCheckpoint(m_stored_thread_state);
@@ -305,7 +305,7 @@
else
{
if (log)
- log->Printf ("DoTakedown called as no-op for thread 0x%4.4x, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
+ log->Printf ("DoTakedown called as no-op for thread 0x%4.4llx, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
}
}
Modified: lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp Wed Oct 19 13:09:39 2011
@@ -152,7 +152,7 @@
}
s->Address(m_addresses[i], sizeof (addr_t));
- s->Printf (" using breakpoint: %d - ", m_break_ids[i]);
+ s->Printf (" using breakpoint: %llu - ", m_break_ids[i]);
Breakpoint *breakpoint = m_thread.GetProcess().GetTarget().GetBreakpointByID (m_break_ids[i]).get();
if (breakpoint)
breakpoint->Dump (s);
Modified: lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp?rev=142534&r1=142533&r2=142534&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp Wed Oct 19 13:09:39 2011
@@ -48,7 +48,7 @@
void
ThreadPlanStepOverBreakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level)
{
- s->Printf("Single stepping past breakpoint site %d at 0x%llx", m_breakpoint_site_id, (uint64_t)m_breakpoint_addr);
+ s->Printf("Single stepping past breakpoint site %llu at 0x%llx", m_breakpoint_site_id, (uint64_t)m_breakpoint_addr);
}
bool
More information about the lldb-commits
mailing list