From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: hjl.tools@gmail.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] PR gdb/16304: Add amd64_x32_linux_record_tdep and amd64_x32_sys_xxx
Date: Sun, 08 Dec 2013 21:59:00 -0000 [thread overview]
Message-ID: <201312082159.rB8LxZZZ031245@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20131208194419.GB10094@intel.com> (hongjiu.lu@intel.com)
> Date: Sun, 8 Dec 2013 11:44:19 -0800
> From: "H.J. Lu" <hongjiu.lu@intel.com>
>
> Hi,
>
> X32 Linux system calls are diffferent from amd64 Linux system calls
> in system call numbers as well as parameter types/values. We can't use
> amd64_linux_record_tdep for x32. This patch adds x32 system call
> numbers. It also adds linux_record_tdep_p to gdbarch_tdep so that
> we can use different linux_record_tdeps for x32 and amd64.
> linux_record_tdep_p will be unused for other x86 targets. Tested on
> Linux/x86-64. OK to install?
No.
There is no reason to add this linux_record_tdep_pmember to the
generic struct gdbarch_tdep. If the system calls are different, you
need to add an amd64_x32_linux_syscall_record() function and make sure
that gets used for x32.
> 2013-12-08 H.J. Lu <hongjiu.lu@intel.com>
>
> PR gdb/16304
> * amd64-linux-tdep.c (amd64_canonicalize_syscall): Handle x32
> system calls.
> (amd64_x32_linux_record_tdep): New.
> (amd64_linux_syscall_record): Handle amd64_x32_sys_rt_sigreturn
> and amd64_x32_sys_arch_prctl. Use tdep->linux_record_tdep_p
> instead of amd64_linux_record_tdep.
> (amd64_linux_init_abi_common): Move amd64_linux_record_tdep
> initialization to ...
> (amd64_linux_init_abi): Here. Set tdep->linux_record_tdep_p
> to amd64_linux_record_tdep.
> (amd64_x32_linux_init_abi): Initialize
> amd64_x32_linux_record_tdep. Set tdep->linux_record_tdep_p to
> amd64_x32_linux_record_tdep.
> * amd64-linux-tdep.h (amd64_x32_syscall): New enum.
> * i386-linux-tdep.c (i386_linux_init_abi): Set
> tdep->linux_record_tdep_p to 386_linux_record_tdep.
> * i386-tdep.c (i386_gdbarch_init): Set tdep->linux_record_tdep_p
> to NULL.
> * i386-tdep.h (gdbarch_tdep): Add linux_record_tdep_p.
>
> ---
> gdb/amd64-linux-tdep.c | 557 ++++++++++++++++++++++++++++++++++++++++++++-----
> gdb/amd64-linux-tdep.h | 280 +++++++++++++++++++++++++
> gdb/i386-linux-tdep.c | 1 +
> gdb/i386-tdep.c | 1 +
> gdb/i386-tdep.h | 3 +
> 5 files changed, 785 insertions(+), 57 deletions(-)
next prev parent reply other threads:[~2013-12-08 21:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-08 19:44 H.J. Lu
2013-12-08 21:59 ` Mark Kettenis [this message]
2013-12-09 0:08 ` H.J. Lu
2013-12-14 23:11 ` 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=201312082159.rB8LxZZZ031245@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--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