Hi,
The app I’m debugging uses a lot of libraries and hence startup is slow due to GDB loading a lot of symbols. I can speed up startup by adding “set auto-solib-add off” into “Additional GDB Commands > …before selecting a target“.
However the above of course disables auto symbol loading, which is correct. So to now load the symbols for a subset of libraries, I need to manually run the following command:
> sharedlibrary libfoo.so\|libbar.so
…which works but I would really like to have this run automatically every time I start debugging. If I add this into the “…before selecting a target” or “…after selecting a target” set of commands, in both cases GDB says “No loaded shared libraries match the pattern ‘sharedlibrary libfoo.so\|libbar.so'”. So this is too early.
It should be executed after VGDB sets the breakpoint on main/exec-run/removes breakpoint. Is there a way to auto execute custom GDB commands at this point? Or some other way to auto load only a subset of symbols?
Thanks in advance for any help with this!