diff options
author | Tom de Vries <tdevries@suse.de> | 2024-06-07 13:59:46 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-06-07 13:59:46 +0200 |
commit | 1a7d840a2164072cb776c21b0bda5710deebd542 (patch) | |
tree | 7a14c0a8408a6222e65bb24daba5681609dff287 /gdb | |
parent | d89cd643c521878572f509093287b5ba229e0fa2 (diff) | |
download | gdb-1a7d840a2164072cb776c21b0bda5710deebd542.zip gdb-1a7d840a2164072cb776c21b0bda5710deebd542.tar.gz gdb-1a7d840a2164072cb776c21b0bda5710deebd542.tar.bz2 |
[gdb/tdep] Fix ARM_LINUX_JB_PC_EABI
In arm-linux-tdep.c, ARM_LINUX_JB_PC_EABI is defined as 9, but it's been 1
since glibc 2.20.
See glibc commit 80a56cc3ee ("ARM: Add SystemTap probes to longjmp and
setjmp.").
Update it, allowing us to run into the gdb/26967 kfail.
Tested on arm-linux.
Approved-By: Luis Machado <luis.machado@arm.com>
PR arm/tdep
Bug: https://www.sourceware.org/bugzilla/show_bug.cgi?id=31089
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/arm-linux-tdep.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 43869e4..b0b6f36 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -101,12 +101,26 @@ static const gdb_byte arm_linux_thumb2_le_breakpoint[] = { 0xf0, 0xf7, 0x00, 0xa particular the FP model) and also (possibly) the C Library. For glibc, eglibc, and uclibc the following holds: If the FP model is - SoftVFP or VFP (which implies EABI) then the PC is at offset 9 in the + SoftVFP or VFP (which implies EABI) then the PC is at offset 1 or 9 in the buffer. This is also true for the SoftFPA model. However, for the FPA model the PC is at offset 21 in the buffer. */ #define ARM_LINUX_JB_ELEMENT_SIZE ARM_INT_REGISTER_SIZE #define ARM_LINUX_JB_PC_FPA 21 -#define ARM_LINUX_JB_PC_EABI 9 +#ifdef __UCLIBC__ +# define ARM_LINUX_JB_PC_EABI 9 +#else +# ifdef __GLIBC__ +# if __GLIBC_PREREQ(2, 20) +/* This has been 1 since glibc 2.20, see glibc commit 80a56cc3ee ("ARM: Add + SystemTap probes to longjmp and setjmp."). */ +# define ARM_LINUX_JB_PC_EABI 1 +# else +# define ARM_LINUX_JB_PC_EABI 9 +# endif +# else +# define ARM_LINUX_JB_PC_EABI 9 +# endif +#endif /* Dynamic Linking on ARM GNU/Linux |