[lldb-dev] [Bug 25133] log enable --stack isn't getting function or line info in liblldb.so on Ubuntu 14.04

via lldb-dev lldb-dev at lists.llvm.org
Sun Oct 11 22:12:06 PDT 2015


Todd Fiala <todd.fiala at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED
           Assignee|lldb-dev at lists.llvm.org     |todd.fiala at gmail.com

--- Comment #3 from Todd Fiala <todd.fiala at gmail.com> ---
Playing with the llvm_add_symbol_exports did not yield anything interesting for
me.  It requires generating export statements for everything to be publicly

What I *did* find that worked was the following:

Step #1: remove the step that sets up an explicit exports in the
source/API/CMakeLists.txt file for cmake.  (i.e. *don't* do the
llvm_add_symbol_exports.  It looks like the second that is called for the SB
API, then nothing else gets out, even with step 2 below).

Step #2: pass the following linker flag to cmake:
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=gold -Wl,-E"

My full build line was:
CC=/usr/bin/clang-3.6 CXX=/usr/bin/clang++-3.6 cmake -GNinja
-DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=gold -Wl,-E"
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold -DCMAKE_BUILD_TYPE=Debug ../llvm 2>&1 |
tee ~/logs/cmake-symbols.log

This got my --stack line to show useful info.

I'll add a cmake flag that lets us essentially say "skip explicit liblldb
exports".  Specifying that, along with whatever linker flags are needed to say
"export everything", takes care of this.

I'll get something up for review on that tomorrow morning.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151012/f034865c/attachment.html>

More information about the lldb-dev mailing list