Re: [RFC] multiple breakpoints from FILE:LINE

Eli Zaretskii
2006-01-13T13:05:01Z

> Date: Fri, 13 Jan 2006 15:56:47 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: Paul Hilfinger <hilfingr@gnat.com>, gdb@sourceware.org
>
> > 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?

How about something like

break something.adb:12 if SOME_CONDITION

where SOME_CONDITION is something we should invent to specify the
instance where we want to put the single breakpoint? This has the
advantage of using an existing syntax, especially if the condition
could be made to use some convenience variable. By contrast, what you
suggest modifies the syntax of a location specification; do we really
want that?