This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH V5 4/5] Adaptation of siginfo fixup for the new bnd fields


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]