diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-01-18 10:17:57 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-03-25 17:25:07 +0000 |
commit | fe67b24240d7a679904c5bef3a7e911a09ea7739 (patch) | |
tree | 7301f3990b22237c0e1672e714d4b3e4f037a241 /gdb/doc | |
parent | 29f7ef927ad1ead740c7f4e3ae1375bff7e9a7e4 (diff) | |
download | gdb-fe67b24240d7a679904c5bef3a7e911a09ea7739.zip gdb-fe67b24240d7a679904c5bef3a7e911a09ea7739.tar.gz gdb-fe67b24240d7a679904c5bef3a7e911a09ea7739.tar.bz2 |
gdb: introduce unwind-on-timeout setting
Now that inferior function calls can timeout (see the recent
introduction of direct-call-timeout and indirect-call-timeout), this
commit adds a new setting unwind-on-timeout.
This new setting is just like the existing unwindonsignal and
unwind-on-terminating-exception, but the new setting will cause GDB to
unwind the stack if an inferior function call times out.
The existing inferior function call timeout tests have been updated to
cover the new setting.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Tested-By: Luis Machado <luis.machado@arm.com>
Tested-By: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5df88be5..f87c2c7 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -20949,6 +20949,22 @@ the default C@t{++} exception handler and the inferior terminated. Show the current setting of stack unwinding in the functions called by @value{GDBN}. +@anchor{set unwind-on-timeout} +@item set unwind-on-timeout +@kindex set unwind-on-timeout +@cindex unwind stack in called functions when timing out +@cindex call dummy stack unwinding on timeout. +Set unwinding of the stack if a function called from @value{GDBN} +times out. If set to @code{off} (the default), @value{GDBN} stops in +the frame where the timeout occurred. If set to @code{on}, +@value{GDBN} unwinds the stack it created for the call and restores +the context to what it was before the call. + +@item show unwind-on-timeout +@kindex show unwind-on-timeout +Show whether @value{GDBN} will unwind the stack if a function called +from @value{GDBN} times out. + @item set may-call-functions @kindex set may-call-functions @cindex disabling calling functions in the program @@ -20980,11 +20996,11 @@ call by typing the interrupt character (often @kbd{Ctrl-c}). If a called function is interrupted for any reason, including hitting a breakpoint, or triggering a watchpoint, and the stack is not unwound -due to @code{set unwind-on-terminating-exception on} or @code{set -unwindonsignal on} (@pxref{stack unwind settings}), -then the dummy-frame, created by @value{GDBN} to facilitate the call -to the program function, will be visible in the backtrace, for example -frame @code{#3} in the following backtrace: +due to @code{set unwind-on-terminating-exception on}, @code{set +unwind-on-timeout on}, or @code{set unwindonsignal on} (@pxref{stack +unwind settings}), then the dummy-frame, created by @value{GDBN} to +facilitate the call to the program function, will be visible in the +backtrace, for example frame @code{#3} in the following backtrace: @smallexample (@value{GDBP}) backtrace @@ -21009,6 +21025,11 @@ Execution}) @value{GDBN} can place a timeout on any functions called from @value{GDBN}. If the timeout expires and the function call is still ongoing, then @value{GDBN} will interrupt the program. +If a function called from @value{GDBN} is interrupted by a timeout, +then by default the inferior is left in the frame where the timeout +occurred, this behaviour can be adjusted with @samp{set +unwind-on-timeout} (@pxref{set unwind-on-timeout}). + For targets that don't support asynchronous execution (@pxref{Background Execution}) then timeouts for functions called from @value{GDBN} are not supported, the timeout settings described below |