Re: [RFC] multiple breakpoints from FILE:LINE

Joel Brobecker
2006-01-13T11:56:58Z

> > Normally, this refers to a single location in a program, but if this line
> > is in the middle of a C++ template, a multiply #included file, or an
> > Ada generic definition, it may refer to several locations. Currently,
> > GDB chooses one of these silently.
>
> Shouldn't it set breakpoints on ALL of those places instead?

I think so. Either this, or ask the user to choose. I think the current
situation is partly historical: In C, the situations where this happens
are rare...

> I'm not sure I understand: why isn't something.adb:12 enough to
> specify the breakpoint location unambiguously?

This is because you may have several instances of the same line. Imagine
that you have an inlined function defined at foobar.c:12. The function
body is duplicated at each call of the function. If the user asks to
insert a breakpoint at this line, which instance/address should the
debugger use?

--
Joel