aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2015-08-27 19:20:29 +0200
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2015-08-27 19:26:31 +0200
commit1db33b5a028820d1eb656bffff727090a5504253 (patch)
tree001b6d43cec72c816c611940b6b6344c1a1d8f8b /gdb/gdbserver
parente0fd7c47bd01e0a6eecf5dec4a4be958f8b3bbc8 (diff)
downloadgdb-1db33b5a028820d1eb656bffff727090a5504253.zip
gdb-1db33b5a028820d1eb656bffff727090a5504253.tar.gz
gdb-1db33b5a028820d1eb656bffff727090a5504253.tar.bz2
Detect SW breakpoints in Cell/B.E. combined debugging
The Linux target and gdbserver now check the siginfo si_code reported on a SIGTRAP to detect whether the trap indicates a software breakpoint was hit. Unfortunately, on Cell/B.E., the kernel uses an si_code value of TRAP_BRKPT when a SW breakpoint was hit in PowerPC code, but a si_code value of SI_KERNEL when a SW breakpoint was hit in SPU code. This patch updates Linux target and gdbserver to accept both si_code values to indicate SW breakpoint on PowerPC. ChangeLog: * nat/linux-ptrace.h (GDB_ARCH_TRAP_BRKPT): Replace by ... (GDB_ARCH_IS_TRAP_BRKPT): ... this. Add __powerpc__ case. * linux-nat.c (check_stopped_by_breakpoint): Use GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT. gdbserver/ChangeLog: * linux-low.c (check_stopped_by_breakpoint): Use GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-low.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 0be3030..cc733d8 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * linux-low.c (check_stopped_by_breakpoint): Use
+ GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
+
2015-08-27 Pedro Alves <palves@redhat.com>
* proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index a8fa91c..f4c6029 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -651,7 +651,7 @@ check_stopped_by_breakpoint (struct lwp_info *lwp)
{
if (siginfo.si_signo == SIGTRAP)
{
- if (siginfo.si_code == GDB_ARCH_TRAP_BRKPT)
+ if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code))
{
if (debug_threads)
{