MIPS Linux <= 4.5 reports SI_KERNEL for all kernel generated traps, instead of TRAP_BRKPT / TRAP_HWBKPT, but GDB isn't aware of this.
The result is that hardware watchpoints are broken and pending/delayed breakpoint events mishandling cause gdb to sometimes report spurious SIGTRAPs.
MIPS Linux 4.6 has been corrected to report the proper TRAP_BRKPT / TRAP_HWBKPT si_codes.
MIPS GDB has been taught to handle SI_KERNEL traps.
Fix pushed to master and 7.11 branch: