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: Multiple breakpoint locations


> From:  Vladimir Prus <ghost@cs.msu.su>
> Date:  Wed, 14 Nov 2007 09:13:16 +0300
> 
> >> > Sorry, I don't understand why; can you please elaborate?  Removing a
> >> > breakpoint instruction from a specific address is a primitive
> >> > operation of the target back-end; why can't we use it for that single
> >> > address?
> 
> Because after that, the output of 'info break' will no longer correspond
> accurately to what the program is.

I need it to correspond to the way I want the program to be stopped,
not to all possible ways a source-level locations specification can be
interpreted in terms of an address.  The latter is of course a correct
starting point, but if I then chose that some of the addresses don't
make sense for me, there's no reason I should see them just for
completeness' sake.

> > Well, my big picture is that today we have no solution for the
> > following use case: (a) I set a breakpoint that results in multiple
> > locations; (b) I look at "info break" and realize that some of these
> > locations are irrelevant for the problem I'm debugging, and I don't
> > want the program to stop there (e.g., maybe stopping there will
> > disrupt some timing); (c) I want to remove these locations from the
> > breakpoints list.
> 
> You disable those locations, and gdb no longer stops there.

That's just a workaround.  The same logic could be used to argue that
there's no need to have the "delete" command at all: you can always
disable the critter.


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