[Lldb-commits] [PATCH] D26093: Limit LLDB_EXPORT_ALL_SYMBOLS to additionally export only the lldb_private namespace symbols

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Sat Oct 29 16:31:38 PDT 2016


tfiala added a comment.

Here's what you get with the same codebase, but using this cmake line instead:

  cmake -GNinja ../llvm -DCMAKE_BUILD_TYPE=Debug -DLLDB_EXPORT_ALL_SYMBOLS:BOOL=YES



  bin/lldb
  (lldb) log enable -S lldb process
  (lldb) target create /bin/ls
  Current executable set to '/bin/ls' (x86_64).
  (lldb) run
  ...
  Process::SetPublicState (state = launching, restarted = 0)
  0  liblldb.so.40 0x00007f8f75b0c970
  1  liblldb.so.40 0x00007f8f7214aac2 lldb_private::Log::VAPrintf(char const*, __va_list_tag*) + 712
  2  liblldb.so.40 0x00007f8f7214a7df lldb_private::Log::Printf(char const*, ...) + 195
  3  liblldb.so.40 0x00007f8f7236c66e lldb_private::Process::SetPublicState(lldb::StateType, bool) + 100
  4  liblldb.so.40 0x00007f8f72370ae5 lldb_private::Process::Launch(lldb_private::ProcessLaunchInfo&) + 667
  5  liblldb.so.40 0x00007f8f7262cbaf lldb_private::platform_linux::PlatformLinux::DebugProcess(lldb_private::ProcessLaunchInfo&, lldb_private::Debugger&, lldb_private::Target*, lldb_private::Error&) + 1839
  6  liblldb.so.40 0x00007f8f723bd932 lldb_private::Target::Launch(lldb_private::ProcessLaunchInfo&, lldb_private::Stream*) + 1288
  7  liblldb.so.40 0x00007f8f7281ffd6
  8  liblldb.so.40 0x00007f8f7221ffa0 lldb_private::CommandObjectParsed::Execute(char const*, lldb_private::CommandReturnObject&) + 808
  9  liblldb.so.40 0x00007f8f722102d2 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, lldb_private::ExecutionContext*, bool, bool) + 2468
  10 liblldb.so.40 0x00007f8f72214748 lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) + 324
  11 liblldb.so.40 0x00007f8f7212b71d lldb_private::IOHandlerEditline::Run() + 545
  12 liblldb.so.40 0x00007f8f720fb32e lldb_private::Debugger::ExecuteIOHandlers() + 110
  13 liblldb.so.40 0x00007f8f72215488 lldb_private::CommandInterpreter::RunCommandInterpreter(bool, bool, lldb_private::CommandInterpreterRunOptions&) + 176
  14 liblldb.so.40 0x00007f8f71eb314b lldb::SBDebugger::RunCommandInterpreter(bool, bool) + 117
  15 lldb          0x0000000000407045
  16 lldb          0x0000000000407408
  17 libc.so.6     0x00007f8f7111f830 __libc_start_main + 240
  18 lldb          0x00000000004038e9
  MonitorChildProcessThreadFunction (arg = 0x12883e0) thread starting...
  0  liblldb.so.40   0x00007f8f75b0c970
  1  liblldb.so.40   0x00007f8f7214aac2 lldb_private::Log::VAPrintf(char const*, __va_list_tag*) + 712
  2  liblldb.so.40   0x00007f8f7214a7df lldb_private::Log::Printf(char const*, ...) + 195
  3  liblldb.so.40   0x00007f8f720b553f
  4  liblldb.so.40   0x00007f8f720ce61e lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 236
  5  libpthread.so.0 0x00007f8f79d3770a
  6  libc.so.6       0x00007f8f7120582d clone + 109
  MonitorChildProcessThreadFunction ::waitpid (pid = 46995, &status, options = 1073741824)...
  0  liblldb.so.40   0x00007f8f75b0c970
  1  liblldb.so.40   0x00007f8f7214aac2 lldb_private::Log::VAPrintf(char const*, __va_list_tag*) + 712
  2  liblldb.so.40   0x00007f8f7214a7df lldb_private::Log::Printf(char const*, ...) + 195
  3  liblldb.so.40   0x00007f8f720b56a4
  4  liblldb.so.40   0x00007f8f720ce61e lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 236
  5  libpthread.so.0 0x00007f8f79d3770a
  6  libc.so.6       0x00007f8f7120582d clone + 109
  started monitoring child process.
  0  liblldb.so.40   0x00007f8f75b0c970
  1  liblldb.so.40   0x00007f8f7214aac2 lldb_private::Log::VAPrintf(char const*, __va_list_tag*) + 712
  2  liblldb.so.40   0x00007f8f7214a7df lldb_private::Log::Printf(char const*, ...) + 195
  3  liblldb.so.40   0x00007f8f720b553f
  4  liblldb.so.40   0x00007f8f720ce61e lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 236
  5  libpthread.so.0 0x00007f8f79d3770a
  6  libc.so.6       0x00007f8f7120582d clone + 109
  7  libc.so.6       000000000000000000 clone + 2397022272
  8  liblldb.so.40   0x00007f8f725afe6c lldb_private::process_gdb_remote::ProcessGDBRemote::EstablishConnectionIfNeeded(lldb_private::ProcessInfo const&) + 212
  9  liblldb.so.40   0x00007f8f725a4364 lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(lldb_private::Module*, lldb_private::ProcessLaunchInfo&) + 1072
  10 liblldb.so.40   0x00007f8f72370b3d lldb_private::Process::Launch(lldb_private::ProcessLaunchInfo&) + 755
  11 liblldb.so.40   0x00007f8f7262cbaf lldb_private::platform_linux::PlatformLinux::DebugProcess(lldb_private::ProcessLaunchInfo&, lldb_private::Debugger&, lldb_private::Target*, lldb_private::Error&) + 1839
  12 liblldb.so.40   0x00007f8f723bd932 lldb_private::Target::Launch(lldb_private::ProcessLaunchInfo&, lldb_private::Stream*) + 1288
  13 liblldb.so.40   0x00007f8f7281ffd6
  14 liblldb.so.40   0x00007f8f7221ffa0 lldb_private::CommandObjectParsed::Execute(char const*, lldb_private::CommandReturnObject&) + 808
  15 liblldb.so.40   0x00007f8f722102d2 lldb_private::CommandInterpreter::HandleCommand(char const*, lldb_private::LazyBool, lldb_private::CommandReturnObject&, lldb_private::ExecutionContext*, bool, bool) + 2468
  16 liblldb.so.40   0x00007f8f72214748 lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) + 324
  17 liblldb.so.40   0x00007f8f7212b71d lldb_private::IOHandlerEditline::Run() + 545
  18 liblldb.so.40   0x00007f8f720fb32e lldb_private::Debugger::ExecuteIOHandlers() + 110
  19 liblldb.so.40   0x00007f8f72215488 lldb_private::CommandInterpreter::RunCommandInterpreter(bool, bool, lldb_private::CommandInterpreterRunOptions&) + 176
  20 liblldb.so.40   0x00007f8f71eb314b lldb::SBDebugger::RunCommandInterpreter(bool, bool) + 117
  21 lldb            0x0000000000407045
  22 lldb            0x0000000000407408
  23 libc.so.6       0x00007f8f7111f830 __libc_start_main + 240
  24 lldb            0x00000000004038e9
  Process::SetPrivateState (stopped)
  ...

We get real symbolication in this case.  Setting breakpoints and doing '(lldb) bt' and the like show similar results.


Repository:
  rL LLVM

https://reviews.llvm.org/D26093





More information about the lldb-commits mailing list