diff options
author | Victor Kamensky <victor.kamensky@linaro.org> | 2014-11-02 13:28:35 -0800 |
---|---|---|
committer | Victor Kamensky <victor.kamensky@linaro.org> | 2014-11-02 13:30:02 -0800 |
commit | dcd4a3a4e7fc3912194d1346d2dfc6252f70b456 (patch) | |
tree | e74a1e61ca69dece8e59575954b8a674bdd25637 /gdb/arm-linux-tdep.c | |
parent | 2959fed98cf1b1fd32516194619a5edbdf6a41a3 (diff) | |
download | gdb-dcd4a3a4e7fc3912194d1346d2dfc6252f70b456.zip gdb-dcd4a3a4e7fc3912194d1346d2dfc6252f70b456.tar.gz gdb-dcd4a3a4e7fc3912194d1346d2dfc6252f70b456.tar.bz2 |
ARM: arm_breakpoint should be little endian form in case for arm BE8
tdep->arm_breakpoint, tdep->thumb_breakpoint, tdep->thumb2_breakpoint
should be set le_ variants in case of arm BE8 code. Those instruciton
sequences are writen to target with simple write_memory, without
regarding gdbarch_byte_order_for_code. But in BE8 case even data
memory is in big endian form, instructions are still in little endian
form.
Because of this issue there are many issues while running gdb test
case in armv7b mode. For example gdb.arch/arm-disp-step.exp test fails
because it gets SIGILL when displaced instrucion sequence reaches
break instruction, which is in wrong byte order.
Solution is to set tdep->xxx_breakpoint sequences in BE8 case (i.e
when gdbarch_byte_order_for_code is BFD_ENDIAN_BIG.
gdb/ChangeLog:
2014-11-02 Victor Kamensky <victor.kamensky@linaro.org>
* arm-linux-tdep.c (arm_linux_init_abi): Use
info.byte_order_for_code to choose endianity of breakpoint
instructions snippets.
Diffstat (limited to 'gdb/arm-linux-tdep.c')
-rw-r--r-- | gdb/arm-linux-tdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index e3587f3..2e79658 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -1361,7 +1361,7 @@ arm_linux_init_abi (struct gdbarch_info info, linux_init_abi (info, gdbarch); tdep->lowest_pc = 0x8000; - if (info.byte_order == BFD_ENDIAN_BIG) + if (info.byte_order_for_code == BFD_ENDIAN_BIG) { if (tdep->arm_abi == ARM_ABI_AAPCS) tdep->arm_breakpoint = eabi_linux_arm_be_breakpoint; |