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>
This commit is contained in:
Corinna Vinschen 2016-08-31 12:15:29 +02:00
parent 472e5439e7
commit a157df3165
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}