This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: set rewindonsignal
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: set rewindonsignal
- From: David Taylor <taylor at cygnus dot com>
- Date: Fri, 11 Feb 2000 15:15:19 -0500
- cc: gdb-patches at sourceware dot cygnus dot com
Date: Thu, 10 Feb 2000 14:16:36 -0500
From: Fernando Nasser <fnasser@cygnus.com>
We have two groups of users who want different behavior of gdb when a
signal is received as a consequence of a "call somefunction()" command.
One wants gdb to return to the state it was before and the other wants
gdb to stay in the stack frame where the signal was received, as this
can be used to debug some situations (note that, depending on the OS and
the context, this can result in a state where execution is not possible
anymore).
The way to get everyone happy is to add a "set rewindonsignal" which, if
"on", will cause the stack to be rewound and the context fully restored
when a signal happens on the inferior call. It does not affect
breakpoints, which do stop in the frame where they occurred (even if
inner than a dummy frame).
The default will be "off", as the original gdb behavior was to stop
inside the frame. I have changed this temporarily in the snapshots due
to a few bugs that we are working on, but as the switch will be
available for those affected (they can add it to their .gdbinit files),
I will revert in time for the next release.
If you think this may have any impact on your work please let me know
(but remember you can set the switch anyway you want).
To me, rewind is something you do to a file or something similar; and
if not otherwise specified, you are rewinding back to the beginning.
When I speak of removing stack frames, I generally speak of unwinding
the stack. If I didn't know that rewindonsignal unwound the stack
back to what it was before the function was called, I wouldn't expect
it to do so.
So, I would prefer that you use some other name for it as I feel that
'rewindonsignal' doesn't imply what it does.
Of course, I'm also in the "leave the stack bloody alone, thank you"
camp. The "if I want the stack unwound, I know how to use the return
command" camp. So, I will likely never set it.