+2015-08-08 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * 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.
+
2015-08-08 Ulrich Weigand <uweigand@de.ibm.com>
* linux-thread-db.c (thread_db_get_thread_local_address): If the
+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.
{
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)
{
{
if (siginfo.si_signo == SIGTRAP)
{
- if (siginfo.si_code == GDB_ARCH_TRAP_BRKPT)
+ if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code))
{
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
running to a breakpoint and checking what comes out of
siginfo->si_code.
- The generic Linux target code should use GDB_ARCH_TRAP_BRKPT
- instead of TRAP_BRKPT to abstract out this x86 peculiarity. */
+ The ppc kernel does use TRAP_BRKPT for software breakpoints
+ in PowerPC code, but it uses SI_KERNEL for software breakpoints
+ in SPU code on a Cell/B.E. However, SI_KERNEL is never seen
+ on a SIGTRAP for any other reason.
+
+ The generic Linux target code should use GDB_ARCH_IS_TRAP_BRKPT
+ instead of TRAP_BRKPT to abstract out these peculiarities. */
#if defined __i386__ || defined __x86_64__
-# define GDB_ARCH_TRAP_BRKPT SI_KERNEL
+# define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == SI_KERNEL)
+#elif defined __powerpc__
+# define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == SI_KERNEL || (X) == TRAP_BRKPT)
#else
-# define GDB_ARCH_TRAP_BRKPT TRAP_BRKPT
+# define GDB_ARCH_IS_TRAP_BRKPT(X) ((X) == TRAP_BRKPT)
#endif
#ifndef TRAP_HWBKPT