Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] Add sp_regnum_from_eax and pc_regnum_from_eax
Date: Wed, 04 Jul 2012 20:51:00 -0000	[thread overview]
Message-ID: <CAMe9rOo+-29AqT_rz2B9wZa2+ieMDxZSVUR24Ws0QNCLYLV_6w@mail.gmail.com> (raw)
In-Reply-To: <201207041953.q64JrCBG024384@glazunov.sibelius.xs4all.nl>

On Wed, Jul 4, 2012 at 12:53 PM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Tue, 3 Jul 2012 16:55:59 -0700
>> From: "H.J. Lu" <hjl.tools@gmail.com>
>>
>> On Tue, Jul 3, 2012 at 12:14 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> > On Tue, Jul 3, 2012 at 10:35 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> >> On Tue, Jul 3, 2012 at 8:54 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> >>> On Tue, Jul 3, 2012 at 7:08 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> >>>>> Date: Thu, 21 Jun 2012 11:14:52 -0700
>> >>>>> From: "H.J. Lu" <hongjiu.lu@intel.com>
>> >>>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>> Here are the first of the last 3 patches for x32 support in GDB.  This
>> >>>>> patch maps $pc to $eip and $sp to $esp for x32.  OK to install?
>> >>>>
>> >>>> The pseudo register handling code is getting too complex :(.  I feel
>> >>>> that hiding the set_gdbarch_pc_regnum() and set_gdbarch_sp_regnum()
>> >>>> calls in i386-tdep.c isn't the right approach.  But I haven't found a
>> >>>> better one yet :(.
>> >>>>
>> >>>
>> >>> One possibility is to set pc/sp to register name instead of regnum.
>> >>> i386_gdbarch_init can map them to regnum after all pseudo registers
>> >>> are finalized.
>> >>>
>> >>> --
>> >>> H.J.
>> >>
>> >> How about this patch? I can also change amd64 and i386
>> >> to use "rsp/"rsp"/"esp"/"eip".
>> >>
>> >
>> > This patch sets SP?PC regnums from register names.
>> >
>> >
>>
>> Here is another approach to set SP/PC regnums after
>> setting up pseudo registers.
>
> I've come to the conclusion that the speudo register handling in
> i386/amd64 needs some serious surgery.  I think your origional diff:
>
> http://sourceware.org/ml/gdb-patches/2012-06/msg00664.html
>
> is the least invasive.  Can you commit that one?
>

Done.  This is the last x32 patch for now.  I checked in
this patch to mention it in NEWS.

Thanks.

-- 
H.J.
--
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.14431
diff -u -p -r1.14431 ChangeLog
--- ChangeLog	4 Jul 2012 20:46:18 -0000	1.14431
+++ ChangeLog	4 Jul 2012 20:49:14 -0000
@@ -1,5 +1,9 @@
 2012-07-04  H.J. Lu  <hongjiu.lu@intel.com>

+	* NEWS: Mention x32 ABI support.
+
+2012-07-04  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* amd64-tdep.c (amd64_x32_init_abi): Set sp_regnum_from_eax to
 	AMD64_RSP_REGNUM and pc_regnum_from_eax to AMD64_RIP_REGNUM.

Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.532
diff -u -p -r1.532 NEWS
--- NEWS	2 Jul 2012 15:29:33 -0000	1.532
+++ NEWS	4 Jul 2012 20:49:14 -0000
@@ -3,6 +3,9 @@

 *** Changes since GDB 7.4

+* GDB now supports x32 ABI.  Visit <http://sites.google.com/site/x32abi/>
+  for more x32 ABI info.
+
 * GDB now supports access to MIPS DSP registers on Linux targets.

 * GDB now supports debugging microMIPS binaries.


      reply	other threads:[~2012-07-04 20:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 18:15 H.J. Lu
2012-07-03 14:08 ` Mark Kettenis
2012-07-03 15:54   ` H.J. Lu
2012-07-03 17:35     ` H.J. Lu
2012-07-03 19:15       ` H.J. Lu
2012-07-03 23:56         ` H.J. Lu
2012-07-04 19:53           ` Mark Kettenis
2012-07-04 20:51             ` H.J. Lu [this message]

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=CAMe9rOo+-29AqT_rz2B9wZa2+ieMDxZSVUR24Ws0QNCLYLV_6w@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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