diff options
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Interpreter/ScriptInterpreterPython.cpp | 23 | ||||
-rw-r--r-- | lldb/source/Symbol/Symbol.cpp | 7 |
2 files changed, 9 insertions, 21 deletions
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index 26d058c9574..15e66610ef1 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -208,8 +208,6 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete PyRun_SimpleString (run_string.GetData()); run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import sys')", m_dictionary_name.c_str()); - PyRun_SimpleString (run_string.GetData()); // Importing 'lldb' module calls SBDebugger::Initialize, which calls Debugger::Initialize, which increments a // global debugger ref-count; therefore we need to check the ref-count before and after importing lldb, and if the @@ -220,37 +218,22 @@ ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interprete // which case the code inside it, including the call to SBDebugger::Initialize(), does not get executed. int old_count = Debugger::TestDebuggerRefCount(); + - run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import lldb')", m_dictionary_name.c_str()); + run_string.Printf ("run_one_line (%s, 'import copy, os, re, sys, uuid, lldb, gnu_libstdcpp, objc')", m_dictionary_name.c_str()); PyRun_SimpleString (run_string.GetData()); + int new_count = Debugger::TestDebuggerRefCount(); if (new_count > old_count) Debugger::Terminate(); run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import copy')", m_dictionary_name.c_str()); - PyRun_SimpleString (run_string.GetData()); - - run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import os')", m_dictionary_name.c_str()); - PyRun_SimpleString (run_string.GetData()); - - run_string.Clear(); 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()); - run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import gnu_libstdcpp')", m_dictionary_name.c_str()); - PyRun_SimpleString (run_string.GetData()); - - run_string.Clear(); - run_string.Printf ("run_one_line (%s, 'import objc')", m_dictionary_name.c_str()); - PyRun_SimpleString (run_string.GetData()); - if (m_dbg_stdout != NULL) { m_new_sysout = PyFile_FromFile (m_dbg_stdout, (char *) "", (char *) "w", _check_and_flush); diff --git a/lldb/source/Symbol/Symbol.cpp b/lldb/source/Symbol/Symbol.cpp index 0f1b7ce2a16..db3ee78b7d5 100644 --- a/lldb/source/Symbol/Symbol.cpp +++ b/lldb/source/Symbol/Symbol.cpp @@ -183,7 +183,7 @@ Symbol::IsTrampoline () const void Symbol::GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target) const { - *s << "id = " << (const UserID&)*this << ", name = \"" << m_mangled.GetName() << '"'; + s->Printf("uid={%6u}", m_uid); const Section *section = m_addr_range.GetBaseAddress().GetSection(); if (section != NULL) @@ -211,6 +211,11 @@ Symbol::GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target) else s->Printf (", value = 0x%16.16llx", m_addr_range.GetBaseAddress().GetOffset()); } + if (m_mangled.GetDemangledName()) + s->Printf(", name=\"%s\"", m_mangled.GetDemangledName().AsCString()); + if (m_mangled.GetMangledName()) + s->Printf(", mangled=\"%s\"", m_mangled.GetMangledName().AsCString()); + } void |