* Question: How to load automatically all libraries of a back trace.
@ 2008-08-16 14:46 Guillaume Laferriere
2008-08-16 15:01 ` Michael Snyder
0 siblings, 1 reply; 5+ messages in thread
From: Guillaume Laferriere @ 2008-08-16 14:46 UTC (permalink / raw)
To: gdb
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,
Guillaume Laferriere
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question: How to load automatically all libraries of a back trace.
2008-08-16 14:46 Question: How to load automatically all libraries of a back trace Guillaume Laferriere
@ 2008-08-16 15:01 ` Michael Snyder
2008-08-20 16:58 ` Guillaume Laferriere
0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2008-08-16 15:01 UTC (permalink / raw)
To: Guillaume Laferriere; +Cc: gdb
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question: How to load automatically all libraries of a back trace.
2008-08-16 15:01 ` Michael Snyder
@ 2008-08-20 16:58 ` Guillaume Laferriere
2008-08-21 11:29 ` Michael Snyder
0 siblings, 1 reply; 5+ messages in thread
From: Guillaume Laferriere @ 2008-08-20 16:58 UTC (permalink / raw)
To: gdb
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.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question: How to load automatically all libraries of a back trace.
2008-08-20 16:58 ` Guillaume Laferriere
@ 2008-08-21 11:29 ` Michael Snyder
2008-08-21 14:17 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2008-08-21 11:29 UTC (permalink / raw)
To: Guillaume Laferriere; +Cc: gdb
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.
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question: How to load automatically all libraries of a back trace.
2008-08-21 11:29 ` Michael Snyder
@ 2008-08-21 14:17 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-08-21 14:17 UTC (permalink / raw)
To: Michael Snyder; +Cc: Guillaume Laferriere, gdb
On Wed, Aug 20, 2008 at 11:54:36AM -0700, Michael Snyder wrote:
> OK, well there are only two choices for the sharedlibrary command.
> Either you name the libs you want, or you get them all.
IIRC Apple has some patches that automate this for backtraces? It's
certainly been requested before.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-21 3:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-16 14:46 Question: How to load automatically all libraries of a back trace Guillaume Laferriere
2008-08-16 15:01 ` Michael Snyder
2008-08-20 16:58 ` Guillaume Laferriere
2008-08-21 11:29 ` Michael Snyder
2008-08-21 14:17 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox