This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

set unwindonsignal (REPOST)


(Sorry, someone just pointed to me that I said rewind.  I meant unwind,
not rewind...)


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 unwindonsignal" which, if
"on", will cause the stack to be unwound 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).



-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]