Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: joseph@codesourcery.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Patch to support AMD64 Solaris 10
Date: Mon, 25 Oct 2004 19:55:00 -0000	[thread overview]
Message-ID: <200410251955.i9PJtCIA031297@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <Pine.LNX.4.61.0410251739090.3442@digraph.polyomino.org.uk> (joseph@codesourcery.com)

   Date: Mon, 25 Oct 2004 17:48:29 +0000 (UTC)
   From: "Joseph S. Myers" <joseph@codesourcery.com>

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


  parent reply	other threads:[~2004-10-25 19:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-25 17:48 Joseph S. Myers
2004-10-25 19:39 ` Andrew Cagney
2004-10-25 19:55 ` Mark Kettenis [this message]
2004-10-25 22:03   ` Joseph S. Myers
2004-10-26 19:44   ` Joseph S. Myers
2004-10-26 20:50     ` Mark Kettenis
2004-10-30 19:57       ` Mark Kettenis
2004-10-30 20:01         ` Joseph S. Myers
2004-11-01 16:43 ` Andrew Cagney
2004-11-01 20:08   ` Joseph S. Myers
2004-11-01 20:34     ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200410251955.i9PJtCIA031297@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox