From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6433 invoked by alias); 25 Oct 2004 19:39:44 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6425 invoked from network); 25 Oct 2004 19:39:43 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 25 Oct 2004 19:39:43 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9PJdZtm031664; Mon, 25 Oct 2004 15:39:35 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9PJdKr18494; Mon, 25 Oct 2004 15:39:20 -0400 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id EA3D61294B5; Mon, 25 Oct 2004 15:38:13 -0400 (EDT) Message-ID: <417D5622.1000304@gnu.org> Date: Mon, 25 Oct 2004 19:39:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: "Joseph S. Myers" Cc: gdb-patches@gcc.gnu.org Subject: Re: Patch to support AMD64 Solaris 10 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00410.txt.bz2 Joseph S. Myers wrote: > This patch adds initial support for Solaris 10 on AMD64. The test results > (debugging both 64-bit and 32-bit binaries) are fairly similar to those > for unmodified GDB (built as 32-bit and debugging 32-bit binaries), though > as the prerelease operating system isn't yet fully reliable running the > GDB testsuite it's difficult to get full testsuite results for comparison. > > The configuration is based on the existing IA32 Solaris support. Sigh, this is unfortunatly adding a further use of a deprecated mechanism (DEPRECATED_TM_FILE) and a non strictly multi-arch port. I assume it is largely for solib? What about instead modifying things so that solib.c is always included and have it locally handle the legacy #ifdef SOLIB_ADD et.al. case? > A limitation of this patch is that GDB needs to be built as a 64-bit > binary (configured with CC="gcc -m64": 32-bit compilation is the default > for this system) to work on AMD64 Solaris; GDB built as a 32-bit binary > doesn't work with this patch on AMD64 Solaris 10. The problem is that > there is a single target triplet and so a single GDB configuration, but > 64-bit GDB should be using the functions in amd64-sol2-nat.c added by this > patch while 32-bit GDB (which in any case could only debug 32-bit > binaries, but the operating system does support plain x86 systems as well > as AMD64 ones, so such a GDB is desirable) should be using the functions > in i386v4-nat.c. Any comments on the best approach for having the single > configuration cleanly support being built as both 32-bit and 64-bit? The 64-bit PPC GNU/Linux developers have the same problem. It's really a top-level configure / config.guess issue so best rasied there (gcc@?, config@?). By the time things get to GDB it's too late - trying to switch to 'cc -m64' after the fact would leave us with BFD built 'cc -m32' but with GDB built 'cc -m64'. Outch! Andrew PS: Suggest looking at inf-child and inf-ptrace. The use of nm-*.h and macros to implement native configurations is also falling from favour.