This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V5 4/5] Adaptation of siginfo fixup for the new bnd fields
- From: Pedro Alves <palves at redhat dot com>
- To: Walfred Tedeschi <walfred dot tedeschi at intel dot com>, eliz at gnu dot org, brobecker at adacore dot com
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 28 Jan 2016 12:37:03 +0000
- Subject: Re: [PATCH V5 4/5] Adaptation of siginfo fixup for the new bnd fields
- Authentication-results: sourceware.org; auth=none
- References: <1453474456-13169-1-git-send-email-walfred dot tedeschi at intel dot com> <1453474456-13169-5-git-send-email-walfred dot tedeschi at intel dot com>
On 01/22/2016 02:54 PM, Walfred Tedeschi wrote:
> Caveat: No support for MPX on x32.
What would it take to support that?
> +/* These types below (native_*) define a siginfo type that is layout
> + the most complete siginfo available for the architecture. */
nat_, not native_, afaics. I'd copy/edit this to:
/* The nat_* types below define the most complete kernel siginfo type
known for the architecture, independent of system/libc headers. */
> +
> +typedef int nat_int_t;
> +typedef void* nat_uptr_t;
> +
> +typedef int nat_time_t;
> +typedef int nat_timer_t;
> +
>
> @@ -192,54 +287,58 @@ typedef struct compat_x32_siginfo
> static void
> compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from)
> {
> + nat_siginfo_t from_nat;
> +
> + gdb_assert (sizeof (nat_siginfo_t) == sizeof (siginfo_t));
Make this a gdb_static_assert, and move it out of the function, below
where nat_siginfo_t is defined. (Likewise the other instances in the
other functions).
OK with those changes.
Thanks,
Pedro Alves