This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Multiple breakpoint locations
> > (gdb) d 1.1
> > warning: bad breakpoint number at or near '1.1'
>
> Well, you can't really delete a location -- if breakpoint expression
> corresponds to 20 addresses, that's the way it is -- you cannot delete
> some of those addresses from the program ;-)
It's not immediately obvious, at least to me, so I think this should be
documented. Also I think error should be used for the message instead of
warning as the requested task is not performed. The message could be more
helpful too:
(gdb) d 1.1
This breakpoint cannot be deleted on its own.
> > 2) I can enable/disable 1 and this appears to enable/disable all the
> > locations.
> > Perhap this could be documented in the manual.
>
> Well yes. Patches welcome ;-)
I don't want to detract from the fact that you have contributed a major
patch but I think you should document your own changes. This is also a
good idea because you understand the changes best.
> > 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?
>
> Does
>
> b 'void foo<int>()'
>
> work better?
Yes, thanks. It seems strange to me that the return type needs to be
specified. I thought with overloading, people talked about signature which
is determined by the name and arguments but not the return type.
--
Nick http://www.inet.net.nz/~nickrob