aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2015-12-11 11:19:52 +0000
committerYao Qi <yao.qi@linaro.org>2015-12-11 11:19:52 +0000
commitb37a6290beb90f4f65f1513626205f7bac695624 (patch)
tree1d8c4e20631fd672de9ae1831e621419bc6403b0 /gdb
parent1e6f4800fc01c7957d0688158385aba3bf5ce8de (diff)
downloadfsf-binutils-gdb-b37a6290beb90f4f65f1513626205f7bac695624.zip
fsf-binutils-gdb-b37a6290beb90f4f65f1513626205f7bac695624.tar.gz
fsf-binutils-gdb-b37a6290beb90f4f65f1513626205f7bac695624.tar.bz2
Use arm_eabi_breakpoint on aarch32
Nowdays, GDBserver chooses arm breakpoint instructions by checking macro __ARM_EABI__. When aarch64 GDBserver debugs arm program, arm_eabi_breakpoint is still needed, but __ARM_EABI__ isn't defined in aarch64 compiler. This causes GDBserver chooses the wrong breakpoint instruction for arm program. This patch fixes it. gdb/gdbserver: 2015-12-11 Yao Qi <yao.qi@linaro.org> * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint arm breakpoint.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-aarch32-low.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 7f7b6c1..d8a817f 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-11 Yao Qi <yao.qi@linaro.org>
+
+ * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
+ arm breakpoint.
+
2015-12-07 Yao Qi <yao.qi@linaro.org>
* configure.srv: Append arm.o to srv_tgtobj for
diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c
index 7379350..930e73a 100644
--- a/gdb/gdbserver/linux-aarch32-low.c
+++ b/gdb/gdbserver/linux-aarch32-low.c
@@ -146,10 +146,10 @@ struct regs_info regs_info_aarch32 =
ABI's breakpoint instruction. For now at least. */
#define arm_eabi_breakpoint 0xe7f001f0UL
-#ifndef __ARM_EABI__
-static const unsigned long arm_breakpoint = arm_abi_breakpoint;
-#else
+#if (defined __ARM_EABI__ || defined __aarch64__)
static const unsigned long arm_breakpoint = arm_eabi_breakpoint;
+#else
+static const unsigned long arm_breakpoint = arm_abi_breakpoint;
#endif
#define arm_breakpoint_len 4