This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb script performance
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jean-Marc Saffroy <saffroy at gmail dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 5 Dec 2006 16:02:31 -0500
- Subject: Re: [PATCH] gdb script performance
- References: <Pine.LNX.4.64.0611300025340.5248@erda.mds> <20061130031323.GA25957@nevyn.them.org> <Pine.LNX.4.64.0611301419070.9872@erda.mds>
On Thu, Nov 30, 2006 at 02:56:54PM +0100, Jean-Marc Saffroy wrote:
> For the PC cache, I guess that just about any address can be passed, so I
> doubt there is much room for improvement (except maybe a cache with more
> than one entry, should it be useful in some cases, but now it's probably
> unneeded).
We shouldn't need to cache at all. I think the right representation
would allow us to look up a single PC and find the best psymtab based
on that PC without having to loop over psymtabs; this requires a pretty
big change to the way we store things, since unfortunately I don't
think we can assume the address ranges of psymtabs are even remotely
sane (multiple psymtabs may overlap, for instance, and it's past time
we started recording DW_AT_ranges discontiguous range information).
Not sure what a good data structure for that would look like.
--
Daniel Jacobowitz
CodeSourcery