This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Multiple breakpoint locations


The new code for breakpoints with multiple locations looks very good and
addresses a common complaint about GDB.  I have a couple of points and
apologise if they have already been discussed.

Folowing the example in the manual:

     Num     Type           Disp Enb  Address    What
     1       breakpoint     keep y    <MULTIPLE>
             stop only if i==1
             breakpoint already hit 1 time
     1.1                         y    0x080486a2 in void foo<int>() at t.cc:8
     1.2                         y    0x080486ca in void foo<double>() at t.cc:8


1) I can enable/disable 1.1 and 1.2 but not delete them:

  (gdb) dis 1.1

     Num     Type           Disp Enb  Address    What
     1       breakpoint     keep y    <MULTIPLE>
             stop only if i==1
             breakpoint already hit 1 time
     1.1                         n    0x080486a2 in void foo<int>() at t.cc:8
     1.2                         y    0x080486ca in void foo<double>() at t.cc:8

  (gdb) d 1.1
  warning: bad breakpoint number at or near '1.1'

2) I can enable/disable 1 and this appears to enable/disable all the locations.
   Perhap this could be documented in the manual.

3) I created this breakpoint by specifying the line but if I do:

    b foo<int>()

   or any variant I can think of, I just get a pending breakpoint as GDB
   doesn't recognise the location.  Can such locations be specified on the
   command line by name?

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]