This is the mail archive of the gdb-patches@sourceware.org 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]

Support for shared libraries on default ARM targets


This is a change to allow the default ARM targets to support shared libraries using "Xfer:libraries:read:". It will not overwrite shared library handling for ARM targets that already specify shared library handling. It adds solib.o and solib-target.o to the ARM targets that don't have it in configure.tgt. In arm-tdep.c it registers the default shared library handler. ABI-specific code will then have a chance to override the shared library support.

Thanks,
Tim

ChangeLog:

2008-11-11 Tim Oberg <toberg@qualcomm.com>

* arm-tdep.c (arm_gdbarch_init): Library support for default arm targets.
* configure.tgt (arm*-*-linux*): Add solib-target.o
(arm*-*-netbsd* | arm*-*-knetbsd*-gnu): Add solib-target.o
(arm*-*-openbsd*): Add solib-target.o
(arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*): Add solib.o and solib-target.o



Patch:


Index: gdb/arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.273
diff -c -p -r1.273 arm-tdep.c
*** gdb/arm-tdep.c	1 Oct 2008 16:41:27 -0000	1.273
--- gdb/arm-tdep.c	11 Nov 2008 18:43:35 -0000
***************
*** 42,47 ****
--- 42,49 ----
  #include "prologue-value.h"
  #include "target-descriptions.h"
  #include "user-regs.h"
+ #include "solib.h"
+ #include "solib-target.h"

  #include "arm-tdep.h"
  #include "gdb/sim-arm.h"
*************** arm_gdbarch_init (struct gdbarch_info in
*** 3321,3326 ****
--- 3323,3331 ----
    /* Virtual tables.  */
    set_gdbarch_vbit_in_delta (gdbarch, 1);

+   /* Set a default shared library handler */
+   set_solib_ops (gdbarch, &solib_target_so_ops);
+
    /* Hook in the ABI-specific overrides, if they have been registered.  */
    gdbarch_init_osabi (info, gdbarch);

Index: gdb/configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.204
diff -c -p -r1.204 configure.tgt
*** gdb/configure.tgt	2 Oct 2008 15:48:06 -0000	1.204
--- gdb/configure.tgt	11 Nov 2008 18:43:35 -0000
*************** arm*-wince-pe | arm*-*-mingw32ce*)
*** 75,95 ****
  arm*-*-linux*)
  	# Target: ARM based machine running GNU/Linux
  	gdb_target_obs="arm-tdep.o arm-linux-tdep.o glibc-tdep.o \
! 			solib.o solib-svr4.o symfile-mem.o corelow.o"
  	build_gdbserver=yes
  	;;
  arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
  	# Target: NetBSD/arm
! 	gdb_target_obs="arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o"
  	;;
  arm*-*-openbsd*)
  	# Target: OpenBSD/arm
  	gdb_target_obs="arm-tdep.o armbsd-tdep.o armobsd-tdep.o obsd-tdep.o \
! 			corelow.o solib.o solib-svr4.o"
  	;;
  arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*)
  	# Target: ARM embedded system
! 	gdb_target_obs="arm-tdep.o"
  	gdb_sim=../sim/arm/libsim.a
  	;;

--- 75,97 ----
arm*-*-linux*)
# Target: ARM based machine running GNU/Linux
gdb_target_obs="arm-tdep.o arm-linux-tdep.o glibc-tdep.o \
! solib.o solib-svr4.o symfile-mem.o corelow.o \
! solib-target.o"
build_gdbserver=yes
;;
arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
# Target: NetBSD/arm
! gdb_target_obs="arm-tdep.o armnbsd-tdep.o solib.o solib-svr4.o \
! solib-target.o"
;;
arm*-*-openbsd*)
# Target: OpenBSD/arm
gdb_target_obs="arm-tdep.o armbsd-tdep.o armobsd-tdep.o obsd-tdep.o \
! corelow.o solib.o solib-svr4.o solib-target.o"
;;
arm*-*-* | thumb*-*-* | strongarm*-*-* | xscale-*-*)
# Target: ARM embedded system
! gdb_target_obs="arm-tdep.o solib.o solib-target.o"
gdb_sim=../sim/arm/libsim.a
;;



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