Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Pending breakpoints
@ 2008-02-26 20:24 Nick Roberts
  2008-02-26 21:38 ` Daniel Jacobowitz
  2008-03-21 14:46 ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Roberts @ 2008-02-26 20:24 UTC (permalink / raw)
  To: gdb-patches


I still think "info break" isn't quite right for pending breakpoints.  This
isn't about previous behaviour, just missing infoemation.  Currently:

   (gdb) b sqrt
   Function "sqrt" not defined.
   Make breakpoint pending on future shared library load? (y or [n]) y

   Breakpoint 1 (sqrt) pending.
   (gdb) info break
   Num     Type           Disp Enb  Address    What
   1       breakpoint     keep y    <PENDING>  sqrt
      (gdb) start
   Breakpoint 2 at 0x804862c: file myprog.c, line 95.
      Starting program: /home/nickrob/myprog 
   main (argc=1, argv=0xbff1d1e4) at myprog.c:95
   95      main (int argc, char **argv) {
   (gdb) info break
   Num     Type           Disp Enb  Address    What
   1       breakpoint     keep y    0xb7f52114 <sqrt+4>
   (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.

The patch below does that.  It's a bit of a guess, though, and I've not run
the testuite.

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


*** breakpoint.c	26 Feb 2008 21:24:24 +1300	1.303
--- breakpoint.c	26 Feb 2008 22:42:54 +1300	
*************** static void print_breakpoint_location (s
*** 3311,3317 ****
        
        ui_out_field_int (uiout, "line", b->line_number);
      }
!   else if (!b->loc)
      {
        ui_out_field_string (uiout, "pending", b->addr_string);
      }
--- 3311,3317 ----
        
        ui_out_field_int (uiout, "line", b->line_number);
      }
!   else if (!b->loc || loc->shlib_disabled)
      {
        ui_out_field_string (uiout, "pending", b->addr_string);
      }


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-03 13:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-26 20:24 Pending breakpoints Nick Roberts
2008-02-26 21:38 ` Daniel Jacobowitz
2008-03-21 14:46 ` Daniel Jacobowitz
2008-04-03 11:18   ` Nick Roberts
2008-04-03 11:36     ` Andreas Schwab
2008-04-03 13:25     ` Daniel Jacobowitz
2008-04-03 17:55       ` Vladimir Prus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox