[lldb-dev] lldb command like gdb's "set auto-solib-add off"
Jim Ingham via lldb-dev
lldb-dev at lists.llvm.org
Mon May 22 11:24:44 PDT 2017
We designed lldb to be as lazy as possible in loading symbol information from the shared libraries as they get loaded. If this is causing you problems, the first thing to do is to figure out why lldb is pulling in more information than you need. For instance, it looks like on Linux the gdb JIT loading breakpoint is getting set with a global search which is pulling in all the symbols from all the initially loaded shared libraries. It would be better to fix things so that only explicit user actions (which can be scoped to shared libraries to limit the search) pull in symbols so we don't have to fiddle around with turning off and on the loading of shared libraries. Back when we were supporting gdb for MacOS I did a lot of work to try to get this right (there are times you really need the shared library info - e.g. when something shows up in a backtrace) so you have to judiciously re-introduce symbols, or the user experience is noticeably degraded.
It also depends on how far you want to go turning this off. There's "don't look at shared libraries at all" which is what the auto-solib-add variable does IIRC. We also had a fairly extensive mechanism to specify "load-levels" for various libraries, which was more user-friendly but much more work to support. Anyway, it would be easy to just turn this shared library notifications - just don't set the dyld load notification breakpoint. That would be the easy part. But as I said above, you're also going to have to make sure you turn it back on for users when some action they request requires it.
Note, there is a setting to determine how much symbol information to read in from libraries loaded from memory (since in device debugging this can be quite slow.) That is the target.memory-module-load-level setting. You might look at that for some hints as to how to proceed.
Jim
> On May 22, 2017, at 8:02 AM, Chunseok Lee via lldb-dev <lldb-dev at lists.llvm.org> wrote:
>
> Hello.
>
> In gdb, I can toggle auto symbol loading using "set auto-solib-add off" command.
> I wonder that lldb has similar command for disabling auto shared library symbol loading?
> If not, where is the good starting point to review the source code to implement this feature?
>
> BR,
> Chunseok Lee
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
More information about the lldb-dev
mailing list