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]

Re: [PATCH]: Extend SVR4 shlib debug changes to SH3 and other targets

   From: Michael Snyder <>
   Date: Mon, 30 Oct 2000 17:02:01 -0800 (PST)

   This change moves the definition of SVR4_SHARED_LIBS into 
   config/tm-linux.h, so that it will affect all linuxen.
   I then add a new file config/sh/tm-linux.h which includes
   config/tm-linux.h (as well as sh/tm-sh.h).  Finally I add
   target-specific definitions of fetch_link_map_offsets, so
   that shared libraries can be cross-debugged.

   2000-10-30  Michael Snyder  <>

	   * config/sh/tm-linux.h: New file.  Include generic tm-linux.h,
	   plus tm-sh.h, then define SVR4_FETCH_LINK_MAP_OFFSETS to use
	   the sh target function instead of the default link map offsets.
	   * config/sh/ Add solib.o and solib-svr4.o to TDEPFILES.
	   Use sh/tm-linux.h instead of sh/tm-sh.h.
	   * sh-tdep.c (sh_linux_svr4_fetch_link_map_offsets):
	   New function.  Construct target-specific link map offsets.
	   * i386-linux-tdep.c (i386_linux_svr4_fetch_link_map_offsets:
	   New function.  Construct target-specific link map offsets.
	   * config/i386/tm-linux.h: Use above function instead of default.

   2000-10-30  Michael Snyder  <>

	   * config/i386/tm-linux.h: Remove definition of SVR4_SHARED_LIBS,
	   and inclusion of solib.h.  Move up into ../tm-linux.h.
	   config/tm-linux.h: Define SVR4_SHARED_LIBS, include solib.h.

Looks good to me.  One minor nit though:

   Index: config/tm-linux.h
   RCS file: /cvs/src/src/gdb/config/tm-linux.h,v
   retrieving revision
   diff -c -3 -p -r1.1.1.1 tm-linux.h
   *** tm-linux.h	1999/12/07 03:56:08
   --- tm-linux.h	2000/10/31 00:57:12
   *** 34,36 ****
   --- 34,42 ----
     /* We need this file for the SOLIB_TRAMPOLINE stuff. */

     #include "tm-sysv4.h"
   + /* We define this if link.h is available, because with ELF we use SVR4 style
   +    shared libraries.  FIXME: move up into config/tm-linux.h?  */
   + #define SVR4_SHARED_LIBS
   + #include "solib.h"		/* Support for shared libraries. */

Please update the comment.  The FIXME can go now, and the blurb about
link.h isn't true anymore isn't it?

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