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]

Re: template breakpoints


On 10/8/07, Vladimir Prus <ghost@cs.msu.su> wrote:
> On Tuesday 09 October 2007 02:35:35 Douglas Evans wrote:
> > Hi.  I downloaded and tried the new support.  Nice.  I noticed that
> > while enable/disable work with the new "multiple breakpoints",
> > condition/ignore/commands don't (currently) work.  Is there a plan to
> > support these with the new breakpoints as well?
>
> They are supposed to work. Can you provide a self-contained (source) program,
> and a set of gdb commands that reproduce the problem?

Appended is the session log.  The testcase is testsuite/gdb.cp/mb-templates.cc.

Note that in breakpoints.cc {enable,disable}_command do a strchr
(args, '.') to watch for a.b spelled breakpoints where as
{commands,ignore,condition}_command just call get_number.  And
delete_command calls get_number_or_range via map_breakpoint_numbers.
[Assuming I'm reading the code correctly ...]

Also, note that by "support" I mean one can, for example, set a
condition on individual breakpoints within the multi-breakpoint(sp?).
[Just making sure we're on the same page ...] Allowing the deletion of
individual multi-breakpoints may be dubious (dunno) but the others
seem useful.

---
dje@ruffy:~/fsf/sourceware/head/obj/gdb/testsuite/gdb.cp$ ../../gdb mb-template\
s
GNU gdb 6.7.50-20071009-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-linux"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) b mb-templates.cc:8
Breakpoint 1 at 0x8048652: file ../../../src/gdb/testsuite/gdb.cp/mb-templates.\
cc, line 8. (2 locations)
(gdb) i b
Num     Type           Disp Enb  Address    What
1       breakpoint     keep y    <MULTIPLE>
1.1                         y    0x08048652 in void foo<int>(int)
                                       at ../../../src/gdb/testsuite/gdb.cp/mb-\
templates.cc:8
1.2                         y    0x0804867a in void foo<double>(double)
                                       at ../../../src/gdb/testsuite/gdb.cp/mb-\
templates.cc:8
(gdb) disable 1.1
(gdb) i b
Num     Type           Disp Enb  Address    What
1       breakpoint     keep y    <MULTIPLE>
1.1                         n    0x08048652 in void foo<int>(int)
                                       at ../../../src/gdb/testsuite/gdb.cp/mb-\
templates.cc:8
1.2                         y    0x0804867a in void foo<double>(double)
                                       at ../../../src/gdb/testsuite/gdb.cp/mb-\
templates.cc:8
(gdb) enable 1.1
(gdb) i b
Num     Type           Disp Enb  Address    What
1       breakpoint     keep y    <MULTIPLE>
1.1                         y    0x08048652 in void foo<int>(int)
                                       at ../../../src/gdb/testsuite/gdb.cp/mb-\
templates.cc:8
1.2                         y    0x0804867a in void foo<double>(double)
                                       at ../../../src/gdb/testsuite/gdb.cp/mb-\
templates.cc:8
(gdb) commands 1.1
No breakpoint number 0.
(gdb) ignore 1.1 3
bad breakpoint number: '1.1 3'
(gdb) cond 1.1
Bad breakpoint argument: '1.1'
(gdb) delete 1.1
warning: bad breakpoint number at or near '1.1'
(gdb)


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