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]

Enable biarch debuggers with --enable-64-bit-bfd on x86-linux, sparc-linux


Configuration names such as i686-linux-gnu, mips-linux-gnu,
powerpc-linux-gnu and sparc-linux-gnu can represent either 32-bit only
configurations, or, depending on how GCC and Binutils are configured,
configurations supporting both 32-bit and 64-bit code.  Configuring
GCC with --enable-targets=all, and Binutils with --enable-64-bit-bfd,
will enable the 64-bit support.  (MIPS does not require
--enable-64-bit-bfd for this support to be enabled, and the GCC patch
with this support for MIPS
<http://gcc.gnu.org/ml/gcc-patches/2009-03/msg01047.html> does not yet
appear to have been committed.)

It's useful for GDB to have the same support for biarch
configurations.  Although native GDB generally needs to be built as a
64-bit binary to debug 64-bit inferiors, it's natural to expect a
cross-GDB configured the same way as a cross-Binutils to have the same
64-bit support.  On mips-linux-gnu and powerpc-linux-gnu, indeed, that
support is present since the same target files are used for 32-bit and
64-bit configurations.  This patch makes i686-linux-gnu and
sparc-linux-gnu add the 64-bit target files if --enable-64-bit-bfd.
OK to commit?

2009-04-17  Joseph Myers  <joseph@codesourcery.com>

	* configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
	--enable-64-bit-bfd.
	(sparc-*-linux*): Likewise.

Index: gdb/configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.213
diff -u -r1.213 configure.tgt
--- gdb/configure.tgt	16 Mar 2009 15:04:14 -0000	1.213
+++ gdb/configure.tgt	17 Apr 2009 10:40:38 -0000
@@ -191,6 +191,10 @@
 	# Target: Intel 386 running GNU/Linux
 	gdb_target_obs="i386-tdep.o i386-linux-tdep.o glibc-tdep.o i387-tdep.o \
 			solib.o solib-svr4.o symfile-mem.o corelow.o linux-tdep.o"
+	if test "x$enable_64_bit_bfd" = "xyes"; then
+	    # Target: GNU/Linux x86-64
+	    gdb_target_obs="amd64-tdep.o amd64-linux-tdep.o ${gdb_target_obs}"
+	fi
 	build_gdbserver=yes
 	;;
 i[34567]86-*-gnu*)
@@ -410,6 +414,11 @@
 	# Target: GNU/Linux SPARC
 	gdb_target_obs="sparc-tdep.o sparc-sol2-tdep.o sol2-tdep.o \
 			sparc-linux-tdep.o solib.o solib-svr4.o symfile-mem.o"
+	if test "x$enable_64_bit_bfd" = "xyes"; then
+	    # Target: GNU/Linux UltraSPARC
+	    gdb_target_obs="sparc64-tdep.o sparc64-sol2-tdep.o \
+			    sparc64-linux-tdep.o ${gdb_target_obs}"
+	fi
 	;;
 sparc64-*-linux*)
 	# Target: GNU/Linux UltraSPARC

-- 
Joseph S. Myers
joseph@codesourcery.com


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