public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Handle MIPS Linux SIGTRAP siginfo.si_code values
@ 2016-02-24 23:11 sergiodj+buildbot
  2016-02-24 23:14 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master sergiodj+buildbot
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: sergiodj+buildbot @ 2016-02-24 23:11 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT e7ad2f145c05bc60b1cd2796c8f3b72f02e3e730 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: e7ad2f145c05bc60b1cd2796c8f3b72f02e3e730

Handle MIPS Linux SIGTRAP siginfo.si_code values

This unbreaks pending/delayed breakpoints handling, as well as
hardware watchpoints, on MIPS.

Ref: https://sourceware.org/ml/gdb-patches/2016-02/msg00681.html

The MIPS kernel reports SI_KERNEL for all kernel generated traps,
instead of TRAP_BRKPT / TRAP_HWBKPT, but GDB isn't aware of this.

Basically, this commit:

- Folds watchpoints logic into check_stopped_by_breakpoint, and
  renames it to save_stop_reason.

- Adds GDB_ARCH_IS_TRAP_HWBKPT.

- Makes MIPS set both GDB_ARCH_IS_TRAP_BRPT and
  GDB_ARCH_IS_TRAP_HWBKPT to SI_KERNEL.  In save_stop_reason, we
  handle the case of the same si_code returning true for both
  TRAP_BRPT and TRAP_HWBKPT by looking at what the debug registers
  say.

Tested on x86-64 Fedora 20, native and gdbserver.

gdb/ChangeLog:
2016-02-24  Pedro Alves  <palves@redhat.com>

	* linux-nat.c (save_sigtrap) Delete.
	(stop_wait_callback): Call save_stop_reason instead of
	save_sigtrap.
	(check_stopped_by_breakpoint): Rename to ...
	(save_stop_reason): ... this.  Bits of save_sigtrap folded here.
	Use GDB_ARCH_IS_TRAP_HWBKPT and handle ambiguous
	GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.  Factor out
	common code between the USE_SIGTRAP_SIGINFO and
	!USE_SIGTRAP_SIGINFO blocks.
	(linux_nat_filter_event): Call save_stop_reason instead of
	save_sigtrap.
	* nat/linux-ptrace.h: Check for both SI_KERNEL and TRAP_BRKPT
	si_code for MIPS.
	* nat/linux-ptrace.h: Fix "TRAP_HWBPT" typo in x86 table.  Add
	comments on MIPS behavior.
	(GDB_ARCH_IS_TRAP_HWBKPT): Define for all archs.

gdb/gdbserver/ChangeLog:
2016-02-24  Pedro Alves  <palves@redhat.com>

	* linux-low.c (check_stopped_by_breakpoint): Rename to ...
	(save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
	handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
	Factor out common code between the USE_SIGTRAP_SIGINFO and
	!USE_SIGTRAP_SIGINFO blocks.
	(linux_low_filter_event): Call save_stop_reason instead of
	check_stopped_by_breakpoint and check_stopped_by_watchpoint.
	Update comments.
	(linux_wait_1): Update comments.


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-02-25  9:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-24 23:11 [binutils-gdb] Handle MIPS Linux SIGTRAP siginfo.si_code values sergiodj+buildbot
2016-02-24 23:14 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master sergiodj+buildbot
2016-02-24 23:14 ` Failures on Fedora-i686, " sergiodj+buildbot
2016-02-24 23:19 ` Failures on Fedora-x86_64-cxx-build-m64, " sergiodj+buildbot
2016-02-24 23:26 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-02-24 23:27 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-24 23:28 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2016-02-24 23:37 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2016-02-24 23:52 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2016-02-25  0:17 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-25  0:31 ` Failures on Debian-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-02-25  2:34 ` Failures on Debian-i686, " sergiodj+buildbot
2016-02-25  3:16 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2016-02-25  3:56 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2016-02-25  5:38 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2016-02-25  5:41 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-25  9:40 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-25 10:46 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).