[Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 25 16:13:46 PDT 2017


jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

If I have a library that uses some singleton class that's not exported, and I'm debugging code in a client of my library, and the state of my library is looking odd based on what it is returning to the client, it seems not unnatural to want to call:

(lldb) expr my_library_singleton->WFTDude()

accessing some debugging function I've put in for that purpose.  This change would make that not work.

Even worse, it would work when I stepped into the code of my library, but then when I stepped out to the client it would stop working.  And the error would be just "unknown symbol my_library_singleton".  We wouldn't have a good way to help explain this failure.

If the general vote is "Jim is nuts, no programmer would ever do this" then I guess it is okay, but this seems to me a not-implausible debugging scenario, and I'd really rather not break it unless we can't think of any other way around the problem this is actually trying to solve.


https://reviews.llvm.org/D39307





More information about the lldb-commits mailing list