public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Genericize gdbarch_handle_segmentation_fault
@ 2020-07-17 22:03 John Baldwin
  2020-07-17 22:03 ` [PATCH 1/5] Add a new gdbarch hook to report additional signal information John Baldwin
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: John Baldwin @ 2020-07-17 22:03 UTC (permalink / raw)
  To: gdb-patches

The gdbarch_handle_segmentation_fault hook can be used to report
architecture-specific information about SIGSEGV signals.  However,
architectures may want to provide information about other signals.  In
addition, on a project I'm working on developers requested signal
specific information when opening a core file.

This series adds a new gdbarch_report_signal_info hook that is invoked
when GDB wants to report information for any received signal as well
as when opening a core file for a process terminated by a signal.  The
name "report" seems more accurate to me than "handle" as the existing
"handle" hooks are not able to adjust program state to permit
continuing after a SIGSEGV, they simply report additional details
about the signal.

I did migrate the existing handle_segmentation_fault hooks, but I have
not added any new hooks that handle signals other than SIGPROT.  I do
have them in a downstream branch for a research architecture (CHERI)
that is not suitable for upstreaming.  It reports additional
information for both SIGSEGV signals and a new SIGPROT signal used to
report MPX-like failures (e.g. buffer overflows).

John Baldwin (5):
  Add a new gdbarch hook to report additional signal information.
  Report architecture-specific signal information for core files.
  Migrate the x86 MPX handle_segmentation_fault hook to
    report_signal_info.
  Migrate the sparc64 ADI handle_segmentation_fault hook to
    report_signal_info.
  Retire the now-unused gdbarch handle_segmentation_fault hook.

 gdb/ChangeLog            | 42 ++++++++++++++++++++++++++++++++++++++++
 gdb/amd64-linux-tdep.c   |  3 +--
 gdb/corelow.c            |  5 ++++-
 gdb/gdbarch.c            | 34 ++++++++++++++++----------------
 gdb/gdbarch.h            | 13 ++++++-------
 gdb/gdbarch.sh           |  7 +++----
 gdb/i386-linux-tdep.c    | 11 +++++------
 gdb/i386-linux-tdep.h    |  5 +++--
 gdb/infrun.c             | 20 ++++---------------
 gdb/sparc64-linux-tdep.c | 12 ++++++------
 10 files changed, 91 insertions(+), 61 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2020-07-21 18:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 22:03 [PATCH 0/5] Genericize gdbarch_handle_segmentation_fault John Baldwin
2020-07-17 22:03 ` [PATCH 1/5] Add a new gdbarch hook to report additional signal information John Baldwin
2020-07-17 22:03 ` [PATCH 2/5] Report architecture-specific signal information for core files John Baldwin
2020-07-17 22:03 ` [PATCH 3/5] Migrate the x86 MPX handle_segmentation_fault hook to report_signal_info John Baldwin
2020-07-17 22:03 ` [PATCH 4/5] Migrate the sparc64 ADI " John Baldwin
2020-07-17 22:03 ` [PATCH 5/5] Retire the now-unused gdbarch handle_segmentation_fault hook John Baldwin
2020-07-21 18:40 ` [PATCH 0/5] Genericize gdbarch_handle_segmentation_fault Tom Tromey

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).