aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
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
commitdb91f50261d30e66350281d18759aa7490672a34 (patch)
tree42c9e5e17cceb0cf244bd179cfc2a34fc4255a5f /gdb/gdbserver
parentb37a6290beb90f4f65f1513626205f7bac695624 (diff)
downloadgdb-db91f50261d30e66350281d18759aa7490672a34.zip
gdb-db91f50261d30e66350281d18759aa7490672a34.tar.gz
gdb-db91f50261d30e66350281d18759aa7490672a34.tar.bz2
Understand arm breakpoints in aarch64_breakpoint_at
AArch64 GDBserver can debug ARM program, and it should recognize various arm breakpoint instructions. This patch should be included in 17b1509a. gdb/gdbserver: 2015-12-11 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (aarch64_breakpoint_at): Call arm_breakpoint_at if the process is 32-bit.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c17
2 files changed, 16 insertions, 6 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index d8a817f..617c249 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
2015-12-11 Yao Qi <yao.qi@linaro.org>
+ * linux-aarch64-low.c (aarch64_breakpoint_at): Call
+ arm_breakpoint_at if the process is 32-bit.
+
+2015-12-11 Yao Qi <yao.qi@linaro.org>
+
* linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
arm breakpoint.
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 5fd3f51..b4eb36b 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -211,14 +211,19 @@ static const gdb_byte aarch64_breakpoint[] = {0x00, 0x00, 0x20, 0xd4};
static int
aarch64_breakpoint_at (CORE_ADDR where)
{
- gdb_byte insn[aarch64_breakpoint_len];
+ if (is_64bit_tdesc ())
+ {
+ gdb_byte insn[aarch64_breakpoint_len];
- (*the_target->read_memory) (where, (unsigned char *) &insn,
- aarch64_breakpoint_len);
- if (memcmp (insn, aarch64_breakpoint, aarch64_breakpoint_len) == 0)
- return 1;
+ (*the_target->read_memory) (where, (unsigned char *) &insn,
+ aarch64_breakpoint_len);
+ if (memcmp (insn, aarch64_breakpoint, aarch64_breakpoint_len) == 0)
+ return 1;
- return 0;
+ return 0;
+ }
+ else
+ return arm_breakpoint_at (where);
}
static void