This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Improve performance with lots of shared libraries
On Friday 09 September 2011 15:35:21, Jan Kratochvil wrote:
> On Fri, 09 Sep 2011 16:25:30 +0200, Daniel Jacobowitz wrote:
> > On Fri, Sep 9, 2011 at 8:31 AM, Gary Benson <gbenson@redhat.com> wrote:
> > > * when there are no pending breakpoints,
> >
> > If you "break foo", it might put that breakpoint in more than one
> > shared library. If you load a new library with an implementation of
> > foo, we should stop on that one too. How can we make that work
> > without processing the library events?
>
> This feature was planned being aware of this problem.
>
> It does not work currently, GDB just puts the breakpoint on a random first
> place found.
... and I don't think that's entirely true. Yes, GDB will stop
trying to resolve the spec to a symbol, but at every event gdb will
still re-set the breakpoint locations. If the new library has
the _same_ file:lineno compiled in (e.g., we put a breakpoint
on a c++ template in a header, or an inline function that is
also used by new library), then we should be getting new locations in
the new shared library, today.
--
Pedro Alves