Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-08-31 13:15:29 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-08-31 13:15:29 +0300
commita157df316546ac77207b2a3c5eb08fa140643866 (patch)
treec44203bb0cb7aaf09d81f1e101e2c7d5d1148bcd
parent472e5439e7c7c7ecb552149de494f91540b55f8b (diff)
strace: Don't print exception info for SetThreadName exception
The new functionality to set the thread name for debugging purposes creates exception debugging events. These are printed out when running strace. Since these exceptions have nothing to do with real exceptions but are, like breakpoint execptions, expected and non-fatal, don't print exception info for them. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/utils/strace.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index b193cfe2b..5d4a23d0f 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -751,15 +751,19 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid)
break;
case EXCEPTION_DEBUG_EVENT:
- if (ev.u.Exception.ExceptionRecord.ExceptionCode
- != (DWORD) STATUS_BREAKPOINT)
+ switch (ev.u.Exception.ExceptionRecord.ExceptionCode)
{
+ case STATUS_BREAKPOINT:
+ case 0x406d1388: /* SetThreadName exception. */
+ break;
+ default:
status = DBG_EXCEPTION_NOT_HANDLED;
if (ev.u.Exception.dwFirstChance)
fprintf (ofile, "--- Process %lu, exception %08lx at %p\n",
ev.dwProcessId,
ev.u.Exception.ExceptionRecord.ExceptionCode,
ev.u.Exception.ExceptionRecord.ExceptionAddress);
+ break;
}
break;
}