From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20613 invoked by alias); 30 Oct 2012 12:58:00 -0000 Received: (qmail 20490 invoked by uid 22791); 30 Oct 2012 12:57:58 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_YM X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Oct 2012 12:57:48 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9UCvjmE018389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Oct 2012 08:57:45 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9UCvfC6028916; Tue, 30 Oct 2012 08:57:42 -0400 Message-ID: <508FCEC5.2020403@redhat.com> Date: Tue, 30 Oct 2012 12:58:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Yao Qi CC: "H.J. Lu" , binutils@sourceware.org, "gdb@sourceware.org" Subject: Re: [rfc] bi-arch for x86-64 corefile. References: <1350881426-4945-1-git-send-email-yao@codesourcery.com> <508F3B88.8060701@codesourcery.com> <508F578F.8050807@codesourcery.com> <508FCA04.6010600@codesourcery.com> In-Reply-To: <508FCA04.6010600@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00113.txt.bz2 On 10/30/2012 12:37 PM, Yao Qi wrote: > This requires something different in configure options. In my previous patch, when configure i686-pc-linux-gnu-gdb to handle bi-arch, we run configure with '--enable-64-bit-bfd'. In current trunk (w/ your patch), we have to run configure with '--enable-targets=x86_64-pc-linux-gnu'. > > Copy gdb@ here to make sure GDB people are aware of this change, otherwise, configuring gdb with '--enable-64-bit-bfd' only still doesn't work for handling x86-64 corefile on x86 gdb. That sounds like an unnecessary restriction. A 32-bit GDB can debug a 64-bit inferior with gdbserver just fine (it can also debug a 64-bit core), provided GDB is built with --enable-64-bit-bfd. Yes, debugging a native 64-bit inferior won't work due to ptrace limitations, but GDB's gcore command can generate cores even when remote debugging w/ gdbserver. We have things like this, gdb/configure.tgt: i[34567]86-*-linux*) # Target: Intel 386 running GNU/Linux gdb_target_obs="i386-tdep.o i386-linux-tdep.o glibc-tdep.o i387-tdep.o \ solib-svr4.o symfile-mem.o \ linux-tdep.o linux-record.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 ;; So it's be nice if bfd did the same in this case. Thus, I'd very much prefer if --enable-64-bit-bfd was enough for making bi-arch corefiles work. -- Pedro Alves