]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: register SIGBUS, SIGFPE, and SIGABRT handlers
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 18 Jun 2021 13:26:30 +0000 (14:26 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 11 Aug 2021 11:35:14 +0000 (12:35 +0100)
commitd03277b79793adec2508d51f8d789cd3761d9b9d
tree8f8974ee4e43c775da054ebdb09321eaaef2fd8d
parent6aa4f97c2b8a3fe3775d90c7485f4ace610fb103
gdb: register SIGBUS, SIGFPE, and SIGABRT handlers

Register handlers for SIGBUS, SIGFPE, and SIGABRT.  All of these
signals are setup as fatal signals that will cause GDB to terminate.
However, by passing these signals through the handle_fatal_signal
function, a user can arrange to see a backtrace when GDB
terminates (see maint set backtrace-on-fatal-signal).

In normal use of GDB there should be no user visible changes after
this commit.  Only if GDB terminates with one of the above signals
will GDB change slightly, potentially printing a backtrace before
aborting.

I've added new tests for SIGFPE, SIGBUS, and SIGABRT.
gdb/event-top.c
gdb/testsuite/gdb.base/bt-on-fatal-signal.exp