From: Pedro Alves <palves@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: "H.J. Lu" <hongjiu.lu@intel.com>, GDB <gdb-patches@sourceware.org>
Subject: Re: PATCH: Convert siginfo for x32 in gdbserver
Date: Thu, 12 Apr 2012 20:14:00 -0000 [thread overview]
Message-ID: <4F872F9B.7090207@redhat.com> (raw)
In-Reply-To: <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
next prev parent reply other threads:[~2012-04-12 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 17:21 H.J. Lu
2012-04-12 20:14 ` Pedro Alves [this message]
2012-04-12 20:58 ` H.J. Lu
2012-04-12 20:27 ` H.J. Lu
2012-04-12 21:26 ` Pedro Alves
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=4F872F9B.7090207@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=hongjiu.lu@intel.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