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: Organization of breakpoint locations


On Mon, 2007-02-19 at 06:57 -0500, Daniel Jacobowitz wrote:
> On Mon, Feb 19, 2007 at 11:38:40AM +0100, Thomas Neumann wrote:
> > Hi,
> > 
> > I would like some suggestions on the organization of breakpoint
> > locations in breakpoint.c. Currently, all breakpoint locations are
> > stored in a linear list. This does not scale if the number of
> > breakpoints is large, see PR 2230 for an example. Instead the
> > breakpoints should be stored in a suitable search structure (e.g. a
> > balanced tree).
> > 
> > I have a patch that converts the list into a splay. Works fine, and the
> > bottleneck indeed goes away, but I am not satisfied with the approach
> > itself.
> 
> Have you tested this in any real world use yet?  This is only the
> first limitation you'll encounter, I think.  For instance, every time
> you step and then stop the program, GDB is going to remove every
> breakpoint.  That's going to be just as slow.

Maybe not.  If they're grouped by address, and if there are
a lot of duplicates, gdb could set/clear the breakpoint at
that address once, and then mark them all inserted or not.



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