From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: Mausoom Sarkar <list.msarkar@gmail.com>,
"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Break whenever an application enters a given library
Date: Fri, 08 May 2009 00:19:00 -0000 [thread overview]
Message-ID: <8ac60eac0905071719p2e2c0741l943d417636c15d5c@mail.gmail.com> (raw)
In-Reply-To: <4A031574.6040704@vmware.com>
On Thu, May 7, 2009 at 10:08 AM, Michael Snyder <msnyder@vmware.com> wrote:
> Mausoom Sarkar wrote:
>>
>> I want gdb to break whenever calls are made to functions within a
>> particular library. How can I set such a library level breakpoint?
>
> In general, you can't.
> Maybe set an access watchpoint on the library's whole text section?
Another way is to do something like this:
bash$ nm /path/to/lib.so | grep ' T ' |
sed -e 's/.* T //' -e 's/^/break /' > gdb.cmds
(gdb) source gdb.cmds
Cheers,
--
Paul Pluzhnikov
prev parent reply other threads:[~2009-05-08 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 9:03 Mausoom Sarkar
2009-05-07 17:17 ` Michael Snyder
2009-05-08 0:19 ` Paul Pluzhnikov [this message]
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=8ac60eac0905071719p2e2c0741l943d417636c15d5c@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=gdb@sourceware.org \
--cc=list.msarkar@gmail.com \
--cc=msnyder@vmware.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