This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/5] Support x32 siginfo
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: hjl dot tools at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 16 Jun 2012 17:10:32 +0200 (CEST)
- Subject: Re: [PATCH 3/5] Support x32 siginfo
- References: <20120613230415.GC11434@intel.com>
> Date: Wed, 13 Jun 2012 16:04:15 -0700
> From: "H.J. Lu" <hongjiu.lu@intel.com>
>
> Hi,
>
> This patch adds x32 siginfo support. It is a repost of
>
> http://sourceware.org/ml/gdb-patches/2012-05/msg00489.html
>
> OK to install?
If you make the small change suggested below.
> H.J.
> ---
> * amd64-linux-nat.c (compat_x32_clock_t): New.
> (compat_x32_siginfo_t): Likewise.
> (compat_x32_siginfo_from_siginfo): Likewise.
> (siginfo_from_compat_x32_siginfo): Likewise.
> (amd64_linux_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
> and siginfo_from_compat_x32_siginfo for x32.
>
> ---
> gdb/amd64-linux-nat.c | 200 ++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 199 insertions(+), 1 deletions(-)
>
> diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
> index ce62e2a..9c4026c 100644
> --- a/gdb/amd64-linux-nat.c
> +++ b/gdb/amd64-linux-nat.c
> @@ -733,9 +916,10 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from)
> static int
> amd64_linux_siginfo_fixup (siginfo_t *native, gdb_byte *inf, int direction)
> {
> + struct gdbarch *gdbarch = get_frame_arch (get_current_frame ());
Blank line here please
> /* Is the inferior 32-bit? If so, then do fixup the siginfo
> object. */
> - if (gdbarch_addr_bit (get_frame_arch (get_current_frame ())) == 32)
> + if (gdbarch_bfd_arch_info (gdbarch)->bits_per_word == 32)