This is the mail archive of the gdb-prs@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]

[Bug breakpoints/15501] New: 'disable 3.1 3.2 3.3' doesn't work as expected.


http://sourceware.org/bugzilla/show_bug.cgi?id=15501

             Bug #: 15501
           Summary: 'disable 3.1 3.2 3.3' doesn't work as expected.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned@sourceware.org
        ReportedBy: palves@redhat.com
    Classification: Unclassified


While "disable 1 2 3 4" works as expected, if one passes location numbers
instead of breakpoint numbers, then only the first location is updated.  Vis:

(gdb) info breakpoints 
No breakpoints or watchpoints.
(gdb) b main
Breakpoint 2 at 0x4004cf: file main.c, line 5.
(gdb) b main
Note: breakpoint 2 also set at pc 0x4004cf.
Breakpoint 3 at 0x4004cf: file main.c, line 5.
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) disable 2 3
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep n   0x00000000004004cf in main at main.c:5
3       breakpoint     keep n   0x00000000004004cf in main at main.c:5
(gdb) enable 2 3
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) disable 2.1 3.1
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   <MULTIPLE>         
2.1                         n     0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) enable 2.1 3.1
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5

In fact, everything after the first location is ignored:

(gdb) disable 2.1 foofoobar
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   <MULTIPLE>         
2.1                         n     0x00000000004004cf in main at main.c:5
3       breakpoint     keep y   0x00000000004004cf in main at main.c:5
(gdb) 

That should warn, just like:

(gdb) disable 2 foofoobar
warning: bad breakpoint number at or near 'foofoobar'

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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