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: Convert siginfo for x32 in gdbserver


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


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