This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Organization of breakpoint locations
- From: Michael Snyder <Michael dot Snyder at palmsource dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Thomas Neumann <tneumann at users dot sourceforge dot net>, gdb at sourceware dot org
- Date: Tue, 20 Feb 2007 17:11:45 -0800
- Subject: Re: Organization of breakpoint locations
- References: <45D97E30.2060008@users.sourceforge.net> <20070219115744.GC6815@caradoc.them.org>
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.