Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Pending breakpoints
Date: Thu, 03 Apr 2008 11:18:00 -0000	[thread overview]
Message-ID: <18420.47315.225382.512236@kahikatea.snap.net.nz> (raw)
In-Reply-To: <20080321144600.GB25307@caradoc.them.org>

Daniel Jacobowitz writes:
 > On Wed, Feb 27, 2008 at 09:14:23AM +1300, Nick Roberts wrote:
 > >    (gdb) nosharedlibrary 
 > >    (gdb) info break
 > >    Num     Type           Disp Enb  Address    What
 > >    1       breakpoint     keep y    <PENDING>  
 > > 
 > > and the last "info break" no longer says what the breakpoint is for.  I don't
 > > really know when you would unload the shared library, in practice, but I think
 > > this line should look like the first output from "info break", i.e., include
 > > sqrt.
 > 
 > I agree that this is wrong.
 > 
 > > The patch below does that.  It's a bit of a guess, though, and I've not run
 > > the testuite.
 > 
 > Seems good to me.  We do the same in print_one_breakpoint_location.
 > The patch is OK with a changelog and a full test run.

Actually I better leave this alone because I don't know what I'm doing
and I can see problems:

    This GDB was configured as "i686-pc-linux-gnu"...
    (gdb) start
    Breakpoint 1 at 0x804862c: file myprog.c, line 135.
    Starting program: /home/nickrob/myprog 
    main (argc=1, argv=0xbfc4cf14) at myprog.c:135
    135     main (int argc, char **argv) {
    (gdb) kill
    Kill the program being debugged? (y or n) y
    (gdb) maint inf bre
    Num     Type           Disp Enb Address    What
    -3      shlib events   keep y   0xb7f02c10 <_dl_debug_state>
            breakpoint already hit 2 times
    -6      longjmp        keep n   0xb7da7be0 <siglongjmp>
    -7      longjmp        keep n   0xb7da7be0 <siglongjmp>
    -8      longjmp        keep n   0xb7da7be0 <siglongjmp>
    -9      longjmp resume keep n   0x00000000 
    (gdb) inf sha
    warning: Temporarily disabling breakpoints for unloaded shared library "/lib/tls/i686/cmov/libc.so.6"
    From        To          Syms Read   Shared Object Library
    0xb7ef57f0  0xb7f09cff  Yes         /lib/ld-linux.so.2
    (gdb) maint inf bre
    Num     Type           Disp Enb Address    What
    -3      shlib events   keep y   0xb7f02c10 <_dl_debug_state>
            breakpoint already hit 2 times
    -6      longjmp        keep n   <PENDING>  longjmp
    -7      longjmp        keep n   <PENDING>  _longjmp
    -8      longjmp        keep n   <PENDING>  siglongjmp
    -9      longjmp resume keep n   0x00000000 
    (gdb) 

And breakpoints -6,-7 and -8 are associated with three different functions
even though they have the same address.

 > Even better would be to discard locations when we shlib_disable a
 > breakpoint, and get rid of the shlib_disable flag.  But doing that may
 > require that we get rid of shared libraries when we're supposed to.

Would that `solve' this problem?


-- 
Nick                                           http://www.inet.net.nz/~nickrob


  reply	other threads:[~2008-04-03 11:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 20:24 Nick Roberts
2008-02-26 21:38 ` Daniel Jacobowitz
2008-03-21 14:46 ` Daniel Jacobowitz
2008-04-03 11:18   ` Nick Roberts [this message]
2008-04-03 11:36     ` Andreas Schwab
2008-04-03 13:25     ` Daniel Jacobowitz
2008-04-03 17:55       ` Vladimir Prus

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=18420.47315.225382.512236@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.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