Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: Guillaume Laferriere <guilafer@gmail.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Question: How to load automatically all libraries of a back trace.
Date: Thu, 21 Aug 2008 11:29:00 -0000	[thread overview]
Message-ID: <48AC686C.4030806@vmware.com> (raw)
In-Reply-To: <f1bc7d40808191830n19e2c3adu1026f3043361b065@mail.gmail.com>

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.
>>
>>


  reply	other threads:[~2008-08-20 18:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-16 14:46 Guillaume Laferriere
2008-08-16 15:01 ` Michael Snyder
2008-08-20 16:58   ` Guillaume Laferriere
2008-08-21 11:29     ` Michael Snyder [this message]
2008-08-21 14:17       ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48AC686C.4030806@vmware.com \
    --to=msnyder@vmware.com \
    --cc=gdb@sourceware.org \
    --cc=guilafer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox