[PATCH] gdb/arm-linux-tdep.c: Handle Thumb signal trampolines

Pedro Alves palves@redhat.com
Thu Jul 24 01:24:00 GMT 2014


On 07/22/2014 05:21 PM, Will Newton wrote:
> Recent versions of glibc have assembled the signal trampoline code
> as Thumb, which causes gdb to misinterpret them and a number of
> testsuite tests to fail. Educate gdb about these trampolines and
> get the tests running again.

For a moment you had me!  The subject/intro made me believe
you were talking about Thumb 1.  Could you update them to
mention "Thumb 2" explicitly, when you push this in?

This looks good to me.

Tiny nit below.

> @@ -246,6 +246,12 @@ static const gdb_byte arm_linux_thumb2_le_breakpoint[] = { 0xf0, 0xf7, 0x00, 0xa
>  #define ARM_SET_R7_RT_SIGRETURN		0xe3a070ad
>  #define ARM_EABI_SYSCALL		0xef000000
>

Could you add a comment here?  Like:

/* Likewise for Thumb 2.  */

( Feel free to expand if it makes sense.  :-) )

> +#define THUMB2_SET_R7_SIGRETURN1	0xf04f
> +#define THUMB2_SET_R7_SIGRETURN2	0x0777
> +#define THUMB2_SET_R7_RT_SIGRETURN1	0xf04f
> +#define THUMB2_SET_R7_RT_SIGRETURN2	0x07ad
> +#define THUMB2_EABI_SYSCALL		0xdf00

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list