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: [RFC] multiple breakpoints from FILE:LINE


> 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?


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