From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17078 invoked by alias); 25 Oct 2004 19:55:21 -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 17036 invoked from network); 25 Oct 2004 19:55:18 -0000 Received: from unknown (HELO walton.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 25 Oct 2004 19:55:18 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by walton.sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id i9PJtD7L023730; Mon, 25 Oct 2004 21:55:13 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id i9PJtDAj031300; Mon, 25 Oct 2004 21:55:13 +0200 (CEST) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id i9PJtCIA031297; Mon, 25 Oct 2004 21:55:12 +0200 (CEST) Date: Mon, 25 Oct 2004 19:55:00 -0000 Message-Id: <200410251955.i9PJtCIA031297@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: joseph@codesourcery.com CC: gdb-patches@sources.redhat.com In-reply-to: (joseph@codesourcery.com) Subject: Re: Patch to support AMD64 Solaris 10 References: X-SW-Source: 2004-10/txt/msg00411.txt.bz2 Date: Mon, 25 Oct 2004 17:48:29 +0000 (UTC) From: "Joseph S. Myers" Hi Joseph, Thanks for your contribution. The code looks pretty good to me, but here are a few comments. 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. Oh dear. So the guys at Sun still have to do some catching up with the Open Source OS'es ;-). The configuration is based on the existing IA32 Solaris support. Fair enough, although it's not necessarily the best example. 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? This sounds pretty much like the situation for Solaris SPARC. I think the way this is solved in sparc-sol2-tdep.c is pretty elegant, but I may be biased ;-). The defined(__arch64__) should be dropped though, since there is no need to support Linux and IA-32/AMD64. For consistency with SPARC I'd suggest nameing the file i386-sol2-nat.c. Comparison with Solaris SPARC makes me believe that using gregset_t/fpregset_t in amd64-sol2-nat.c isn't right and that you should use prgregset_t/prfpregset_t instead. Again, for consistency with Solaris SPARC, could you name the makefile fragments sol2-64.m[th] instead of sol64.m[th]? Oh and I suppose Sun is calling this Solaris AMD64 instead of Solaris x86-64 so I think your comments should do the same. AFAIAC, scrap the "Based on" comments. I don't think they're very useful. You're not listed in the GDB MAINTAINERS file, so we'll have to check out the paperwork first before I can approve any of this. Cheers, Mark