This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: [PATCH] dl-dtprocnum.h


   From: Ulrich Drepper <drepper@redhat.com>
   Date: 09 Jun 2000 16:11:13 -0700

   Mark Kettenis <kettenis@wins.uva.nl> writes:

   > Yep, GDB uses it, probably ever since it supports debugging ELF shared
   > libraries.  The header seems to be available on all SVR4 derived
   > systems and on ELF based *BSD systems too.  The comments in our
   > <link.h> explicitly say that it is intended to be used by the
   > debugger.

   The debugger is using r_debug.  But link_map?

Sure, it walks the map to find out which dynamic libraries are loaded,
their names, the address they're loaded at, etc.  That's what the
r_map member of `struct r_debug' is there for.

All this stuff is in gdb/solib.c (which also implements support for
old SunOS 4 shared libraries, so look at the bits that are
conditionalized on SVR4_SHARED_LIBS; this should be cleaned up of
course).  The same code is used for SVR4, Solaris, Linux, the Hurd,
FreeBSD/ELF and NetBSD/ELF.

Mark

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