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


> > I think it's a question of how much complexity one wants here.  AIUI,
> > the breakpoint is represented as source+line.  One would have to
> > augment that to mean source+line+except-this (I think).
> 
> Not necessarily.  You could look up the struct bp_location that
> corresponds to 1.1 (by using its address as a key), and remove that
> struct bp_location from the chain we maintain for breakpoint 1.

The design issue occurs in certain situations when we have to
recompute the breakpoint location addresses. For instance, when
a shared library gets loaded, we recompute the breakpoint locations.
So, when you delete a bp_location, we need to have a way of being
able to make sure that it is not re-inserted the next time we
recompute the breakpoint locations.

We could compromise and have a caveat where GDB doesn't worry for now
about remembering which bp_location we deleted. This might cause a
bp_location to re-appear unexpectedly, but there will be some situations
under which things should work fine. For instance, if the breakpoint
is inserted after the program has been started and all shared libraries
are loaded, as long as the program does not load manually extra shared
libraries, it shouldn't be a problem. It's a bit dogdy, and will require
ample documentation, but it's a thought.

-- 
Joel


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