old-cross-binutils/gdb/nat
Pedro Alves 77770d8321 MIPS/Linux: Also recognize TRAP_BRKPT and TRAP_HWBKPT
This makes the MIPS Linux backends recognize TRAP_BRKPT and
TRAP_HWBKPT in siginfo.si_code in addition to SI_KERNEL, since Linux
4.6 now reports the finer-grained si_code values too.

Refs:
 https://sourceware.org/ml/gdb-patches/2016-02/msg00756.html
 https://sourceware.org/ml/gdb-patches/2016-04/msg00090.html

On kernels that report SI_KERNEL (<= 4.5), we'll enter the "ambiguous"
path of save_stop_reason:

	  if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code)
	      && GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code))
	    {
	      /* The si_code is ambiguous on this arch -- check debug
		 registers.  */
	      if (!check_stopped_by_watchpoint (lp))
		lp->stop_reason = TARGET_STOPPED_BY_SW_BREAKPOINT;
	    }

while on kernels that report the finer-grained si_code values (>= 4.6),
we'll enter the corresponding branches:

	  else if (GDB_ARCH_IS_TRAP_BRKPT (siginfo.si_code))
	    {
	    }
	  else if (GDB_ARCH_IS_TRAP_HWBKPT (siginfo.si_code))
	    {
	      ...

gdb/ChangeLog:
2016-04-15  Pedro Alves  <palves@redhat.com>

	* nat/linux-ptrace.h [__mips__] (GDB_ARCH_IS_TRAP_BRKPT): Also
	accept TRAP_BRKPT.
	 [__mips__] (GDB_ARCH_IS_TRAP_HWBKPT): Also accept TRAP_HWBKPT.
2016-04-15 23:52:00 +01:00
..
aarch64-linux-hw-point.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
aarch64-linux-hw-point.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
aarch64-linux.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
aarch64-linux.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
amd64-linux-siginfo.c Adaptation of siginfo fixup for the new bnd fields 2016-02-02 12:02:16 +01:00
amd64-linux-siginfo.h Adaptation of siginfo fixup for the new bnd fields 2016-02-02 12:02:16 +01:00
gdb_ptrace.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb_thread_db.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
glibc_thread_db.h Move shared native target specific code to gdb/nat 2014-06-20 14:06:48 +01:00
linux-btrace.c Remove trademark acknowledgements throughout 2016-01-12 15:03:11 +00:00
linux-btrace.h Remove trademark acknowledgements throughout 2016-01-12 15:03:11 +00:00
linux-namespaces.c Fix gdbserver build failure on targets without fork 2016-01-18 11:39:42 +00:00
linux-namespaces.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-nat.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-osdata.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-osdata.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-personality.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-personality.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-procfs.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-procfs.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-ptrace.c Fix invalid conversion from void * to gdb_byte * 2016-01-12 16:29:30 +00:00
linux-ptrace.h MIPS/Linux: Also recognize TRAP_BRKPT and TRAP_HWBKPT 2016-04-15 23:52:00 +01:00
linux-waitpid.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
linux-waitpid.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mips-linux-watch.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mips-linux-watch.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ppc-linux.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ppc-linux.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-cpuid.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-dregs.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-dregs.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-gcc-cpuid.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux-dregs.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux-dregs.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
x86-linux.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00