This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: Convert siginfo for x32 in gdbserver
- From: Pedro Alves <palves at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "H.J. Lu" <hongjiu dot lu at intel dot com>, GDB <gdb-patches at sourceware dot org>
- Date: Thu, 12 Apr 2012 20:40:11 +0100
- Subject: Re: PATCH: Convert siginfo for x32 in gdbserver
- References: <20120412172000.GA7985@intel.com>
On 04/12/2012 06:20 PM, H.J. Lu wrote:
> /* Convert a native/host siginfo object, into/from the siginfo in the
> @@ -938,6 +1113,21 @@ x86_siginfo_fixup (siginfo_t *native, void *inf, int direction)
>
> return 1;
> }
> + /* No fixup for native x32 GDB. */
> + else if (sizeof (void *) == 8)
I'm confused. Isn't this _also_ reached when both the inferior and gdbserver are 64-bit?
There should also be no fixup then.
> + {
> + if (sizeof (siginfo_t) != sizeof (compat_siginfo_t))
if (sizeof (siginfo_t) != sizeof (compat_x32_siginfo_t))
> + fatal ("unexpected difference in siginfo");
> +
> + if (direction == 0)
> + compat_x32_siginfo_from_siginfo ((struct compat_x32_siginfo *) inf,
> + native);
> + else
> + siginfo_from_compat_x32_siginfo (native,
> + (struct compat_x32_siginfo *) inf);
> +
> + return 1;
> + }
> #endif
>
--
Pedro Alves