This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question: How to load automatically all libraries of a back trace.


OK, well there are only two choices for the sharedlibrary command.
Either you name the libs you want, or you get them all.

Perhaps you could do a backtrace, shunt the results to a file
(see "help set logging"), then grep the shared lib names out
of it and sed them into a set of "sharedlib" commands, which
you would then "source" back into gdb?

Guillaume Laferriere wrote:
Thanks for the answer but it does not work in my case.

Calling sharedlibrary without args loads up too much symbols.
It loads all the symbols of the libraries in memory and for me it's too much.

I'm looking for a way to load only libraries that are referenced in a
given call stack to avoid loading everything.

Thanks

Guillaume

On Fri, Aug 15, 2008 at 4:02 PM, Michael Snyder <msnyder@vmware.com> wrote:
Guillaume Laferriere wrote:
I'm debugging an application that has a lot of shared libraries so I
always have to run with auto-solib-add turned off.

When I get back trace I always need to go through the process of
running manually "bt" then "shared-library libMyLib.so" until I get
the full valid back trace.

Is there a way to automate that process?
Maybe using a user command that does it for me.
Is there someone that already did that?

Thanks in advance for the help,

I think "shared-library" with no arguments.
"Info shared" will confirm for you whether they
have all been loaded.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]