This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Multiple breakpoint locations
> > The manual lists cases where a given function in source can correspond to
> > several PC values, and they say:
> >
> > In all those cases, @value{GDBN} will insert a breakpoint at all
> > the relevant locations.
> >
> > So it happens automatically.
>
> Well, I think it's not explicit enough. I will try to add some more
> explicit explanations when I have time.
The only way I've managed to create breakpoints at multiple locations is
by specifying a line number inside the template/constructor. For templates
I understand that the breakpoints are for different types, e.g., float, int
as used by the program. For constructors:
* For a C++ constructor, the GCC compiler generates several
instances of the function body, used in different cases.
I don't understand what the second breakpoint refers to, or why there may
be more than one instance.
So I think, at some point, a separate node, or one grouped with breakpoint
menus to highlight the differences, would be a good idea. Other things, like
needing to include the return type in the template name when specifying a
breakpoint location could also be included.
--
Nick http://www.inet.net.nz/~nickrob