This is the mail archive of the 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: gdb and dlopen

On Wed, Oct 17, 2001 at 12:58:38PM -0700, Kevin Buettner wrote:
> On Oct 17, 12:09pm, Kimball Thurston wrote:
> > Along the same lines of just trying to clean up unnecessary work, I
> > was seeing 2 scans of all the open dsos for each dlopen call - it
> > looks like we are getting 2 BPSTAT_WHAT_CHECK_SHLIBS events (in
> > infrun.c) for each dlopen which causes us to rescan everything. Is
> > there a way to distinguish these two events, and only do the scan
> > once? 
> I haven't looked at how hard it'd be, but it seems to me that it'd
> be a good idea for gdb to note that a shlib event has happened without
> immediately doing anything about it.  Then, when the target stops
> for some other reason (than a shlib event), we handle all of them at
> once.  This should cut down on the memory traffic greatly.

Actually implementing this, at first glance, is easy.  However, there's
a couple of interesting issues.  For instance, suppose that we want to
reset a breakpoint in a shared library; we need to read in the symbols
for that shared library before we can do that.  If we defer it, and
there are no other breakpoints, then we'll never set the breakpoint and
never stop.


Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

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