diff options
author | Christopher Faylor <me@cgf.cx> | 2000-10-12 06:22:30 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-10-12 06:22:30 +0000 |
commit | 5e0d760fb82d2d04c34306803253777aa5040fce (patch) | |
tree | 3cc5eec366fb30f8c93a4ee0f8b11a6d3cffb82d /winsup | |
parent | ec300c997904f1db79cd5ca49f798ae08a3eedba (diff) | |
download | newlib-5e0d760fb82d2d04c34306803253777aa5040fce.zip newlib-5e0d760fb82d2d04c34306803253777aa5040fce.tar.gz newlib-5e0d760fb82d2d04c34306803253777aa5040fce.tar.bz2 |
* strace.cc (proc_child): Handle exceptions correctly.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/utils/strace.cc | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 7e136c3..83e4582 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +Thu Oct 12 02:19:12 2000 Christopher Faylor <cgf@cygnus.com> + + * strace.cc (proc_child): Handle exceptions correctly. + Sun Oct 8 23:11:17 2000 Christopher Faylor <cgf@cygnus.com> * ps.cc (main): Change order of reporting slightly so that windows pids diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index a958aa4..6f901e1 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -504,6 +504,7 @@ proc_child (unsigned mask, FILE *ofile) while (1) { BOOL debug_event = WaitForDebugEvent (&ev, 1000); + DWORD status = DBG_CONTINUE; if (!debug_event) continue; @@ -533,9 +534,12 @@ proc_child (unsigned mask, FILE *ofile) case EXIT_PROCESS_DEBUG_EVENT: remove_child (ev.dwProcessId); break; + case EXCEPTION_DEBUG_EVENT: + if (ev.u.Exception.ExceptionRecord.ExceptionCode != STATUS_BREAKPOINT) + status = DBG_EXCEPTION_NOT_HANDLED; + break; } - if (!ContinueDebugEvent (ev.dwProcessId, ev.dwThreadId, - DBG_CONTINUE)) + if (!ContinueDebugEvent (ev.dwProcessId, ev.dwThreadId, status)) error (0, "couldn't continue debug event, windows error %d", GetLastError ()); if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT && --processes == 0) |