From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8841 invoked by alias); 17 Apr 2009 11:00:30 -0000 Received: (qmail 8816 invoked by uid 22791); 17 Apr 2009 11:00:27 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_93,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Apr 2009 11:00:23 +0000 Received: (qmail 25837 invoked from network); 17 Apr 2009 11:00:21 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Apr 2009 11:00:21 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.69) (envelope-from ) id 1Lulno-0002pU-Fo for gdb-patches@sourceware.org; Fri, 17 Apr 2009 11:00:12 +0000 Date: Fri, 17 Apr 2009 11:00:00 -0000 From: "Joseph S. Myers" To: gdb-patches@sourceware.org Subject: Enable biarch debuggers with --enable-64-bit-bfd on x86-linux, sparc-linux Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00420.txt.bz2 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 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 * 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