Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Peter Jay Salzman <p@dirac.org>,
	Gdb Mailing List <gdb@sources.redhat.com>
Subject: Re: question about conditional breaking
Date: Fri, 20 Sep 2002 08:46:00 -0000	[thread overview]
Message-ID: <1020920154645.ZM25830@localhost.localdomain> (raw)
In-Reply-To: Peter Jay Salzman <p@dirac.org> "question about conditional breaking" (Sep 20, 12:36am)

On Sep 20, 12:36am, Peter Jay Salzman wrote:

> so it appears that here's the rule:
> 
> you're allowed to use any function, even library functions, provided that:
> 
> 1. the library is linked to your application
> 2. you actually _use_ the function somewhere in your code.
> 
> to be honest, i'm not the least surprised by condition 1, but i'm
> shocked by condition 2.

Is the library in question a shared library?

I'm not all that surprised by condition 2 if you attempt to set these
conditional breakpoints prior to running gdb (and thus loading the
shared library).  

For library functions which are used by your application, you're able
to find them prior to loading the shared library due to the fact that
these symbols have PLT entries.  Once the shared library has been
loaded, you should be able to find other library functions too.

Something to try: Put a breakpoint on main and run the program. 
Once the breakpoint has been hit, try adding your conditional
breakpoints.  My guess is that you'll be able to add those that
you couldn't previously add.

BTW, I believe that this is the same problem as being unable to put
breakpoints on shared library functions (which are not directly used
by the application) prior to the shared library being loaded.

Kevin


      parent reply	other threads:[~2002-09-20 15:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-20  0:36 Peter Jay Salzman
2002-09-20  6:46 ` Daniel Jacobowitz
2002-09-20  8:46 ` Kevin Buettner [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=1020920154645.ZM25830@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=p@dirac.org \
    /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