From: "H.J. Lu" <hongjiu.lu@intel.com>
To: GDB <gdb-patches@sourceware.org>
Subject: PATCH: Set size of long/ptr as well as sp/pc for x32
Date: Mon, 14 May 2012 18:02:00 -0000 [thread overview]
Message-ID: <20120514180146.GA18462@intel.com> (raw)
Hi,
This patch should be applied on top of
http://sourceware.org/ml/gdb-patches/2012-05/msg00460.html
http://sourceware.org/ml/gdb-patches/2012-05/msg00462.html
It sets size of long/ptr as well as sp/pc for x32. OK to install after
the above patches are approved?
Thanks.
H.J.
---
* amd64-linux-tdep.c (amd64_ilp32_linux_init_abi): Set long and
ptr to 32 bits. Set sp_regnum_from_eax to AMD64_RSP_REGNUM and
pc_regnum_from_eax to AMD64_RIP_REGNUM.
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index d0c6f8f..0348cde 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -1572,8 +1572,13 @@ static void
amd64_ilp32_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
amd64_linux_init_abi (info, gdbarch, tdesc_x32_linux,
svr4_ilp32_fetch_link_map_offsets);
+ set_gdbarch_long_bit (gdbarch, 32);
+ set_gdbarch_ptr_bit (gdbarch, 32);
+ tdep->sp_regnum_from_eax = AMD64_RSP_REGNUM;
+ tdep->pc_regnum_from_eax = AMD64_RIP_REGNUM;
}
\f
next reply other threads:[~2012-05-14 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 18:02 H.J. Lu [this message]
2012-05-14 18:11 ` Joel Brobecker
2012-05-14 18:16 ` H.J. Lu
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=20120514180146.GA18462@intel.com \
--to=hongjiu.lu@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.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