aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-12-20 13:16:17 -0700
committerTom Tromey <tromey@adacore.com>2025-01-07 06:42:34 -0700
commit844afe8d0e5bc95ad48dd46d6adcdc350f598b7d (patch)
tree505705075b25a92628c78c1f996603d5aa508d7b /gdb/doc
parent15f2f44ad7013019e173487a2362acfccc2bbd18 (diff)
downloadbinutils-844afe8d0e5bc95ad48dd46d6adcdc350f598b7d.zip
binutils-844afe8d0e5bc95ad48dd46d6adcdc350f598b7d.tar.gz
binutils-844afe8d0e5bc95ad48dd46d6adcdc350f598b7d.tar.bz2
Clarify documentation of signal numbers
A user was confused by the meaning of signal numbers in the gdb CLI. For instance, when using "signal 3", exactly which signal is delivered? Is it always 3, or is it always SIGQUIT? This patch attempts to clarify the documentation here.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/gdb.texinfo28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index c77ac7f..5c16361 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -6884,6 +6884,34 @@ fatal so it can carry out the purpose of the interrupt: to kill the program.
program. You can tell @value{GDBN} in advance what to do for each kind of
signal.
+When specifying a signal by number, @value{GDBN} translates the number
+to the target platform according to the corresponding signal name.
+For example, @value{GDBN} always treats signal 1 as @code{SIGHUP}.
+So, when specifying @samp{1} as a signal, @value{GDBN} will translate
+this to the target's @code{SIGHUP}, whatever that might be.
+
+Numbers may only be used for signals 1 through 15. @value{GDBN} uses
+this mapping:
+
+@multitable {Number} {SIGTERM}
+@headitem Number @tab Name
+@item 1 @tab SIGHUP
+@item 2 @tab SIGINT
+@item 3 @tab SIGQUIT
+@item 4 @tab SIGILL
+@item 5 @tab SIGTRAP
+@item 6 @tab SIGABRT
+@item 7 @tab SIGEMT
+@item 8 @tab SIGFPE
+@item 9 @tab SIGKILL
+@item 10 @tab SIGBUS
+@item 11 @tab SIGSEGV
+@item 12 @tab SIGSYS
+@item 13 @tab SIGPIPE
+@item 14 @tab SIGALRM
+@item 15 @tab SIGTERM
+@end multitable
+
@cindex handling signals
Normally, @value{GDBN} is set up to let the non-erroneous signals like
@code{SIGALRM} be silently passed to your program