diff options
author | Pedro Alves <palves@redhat.com> | 2015-11-17 15:17:45 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-11-17 15:21:45 +0000 |
commit | 95824559df96a53ddeccbaacd91617f83c8d52cd (patch) | |
tree | b04e1414c077cedcf7043fa10b32848a2963b9fb /gdb/common | |
parent | ce7715e2594db00b2f434f62aa264a1061221b72 (diff) | |
download | gdb-95824559df96a53ddeccbaacd91617f83c8d52cd.zip gdb-95824559df96a53ddeccbaacd91617f83c8d52cd.tar.gz gdb-95824559df96a53ddeccbaacd91617f83c8d52cd.tar.bz2 |
[C++/mingw] Simplify first chance exception handling
Building in C++ errors out with:
../../src/gdb/windows-nat.c: In function 'int get_windows_debug_event(target_ops*, int, target_waitstatus*)':
../../src/gdb/windows-nat.c:1503:13: warning: invalid conversion from 'int' to 'gdb_signal' [-fpermissive]
last_sig = 1;
^
../../src/gdb/windows-nat.c:1533:43: warning: invalid conversion from 'int' to 'gdb_signal' [-fpermissive]
windows_resume (ops, minus_one_ptid, 0, 1);
^
../../src/gdb/windows-nat.c:1228:1: warning: initializing argument 4 of 'void windows_resume(target_ops*, ptid_t, int, gdb_signal)' [-fpermissive]
windows_resume (struct target_ops *ops,
^
Looking at the code, I can't figure out why we treat first chance
exceptions any different here.
AFAICS, we set last_sig to 1, and then call windows_resume passing
signal==1, so the DBG_EXCEPTION_NOT_HANDLED code path in win32_resume
is taken:
~~~
if (sig != GDB_SIGNAL_0)
{
if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
{
OUTMSG (("Cannot continue with signal %d here.\n", sig));
}
else if (sig == last_sig)
continue_status = DBG_EXCEPTION_NOT_HANDLED;
else
OUTMSG (("Can only continue with recieved signal %d.\n", last_sig));
}
~~~
Fix this by removing this special casing. gdbserver also goes
straight to continuing with DBG_EXCEPTION_NOT_HANDLED, AFAICS.
gdb/ChangeLog:
2015-11-17 Pedro Alves <palves@redhat.com>
* windows-nat.c (handle_exception): Return 0 for first chance
exceptions.
(get_windows_debug_event): Adjust.
Diffstat (limited to 'gdb/common')
0 files changed, 0 insertions, 0 deletions