File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1919#define DS2_EXCEPTION_UNCAUGHT_COM 0x800706BA
2020#define DS2_EXCEPTION_UNCAUGHT_USER 0xE06D7363
2121#define DS2_EXCEPTION_UNCAUGHT_WINRT 0x40080201
22+ #define DS2_EXCEPTION_VC_THREAD_NAME_SET 0x406D1388
2223
2324#if !defined(HAVE_WaitForDebugEventEx )
2425#define WaitForDebugEventEx WaitForDebugEvent
Original file line number Diff line number Diff line change @@ -125,6 +125,14 @@ void Thread::updateState(DEBUG_EVENT const &de) {
125125 PRI_PTR_CAST (de.u .Exception .ExceptionRecord .ExceptionAddress ));
126126
127127 switch (de.u .Exception .ExceptionRecord .ExceptionCode ) {
128+ case DS2_EXCEPTION_VC_THREAD_NAME_SET:
129+ // This is a special exception code that is used by the Microsoft C++
130+ // runtime to notify the debugger that a thread has started or exited.
131+ // We don't care about this, so we just ignore it. Some context at
132+ // https://github.com/go-delve/delve/issues/1383.
133+ _stopInfo.clear ();
134+ _process->resume ();
135+ break ;
128136 case STATUS_BREAKPOINT:
129137 case STATUS_SINGLE_STEP: {
130138 _stopInfo.event = StopInfo::kEventStop ;
Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ char const *Stringify::ExceptionCode(DWORD code) {
120120 return " 0xE06D7363 (uncaught user exception)" ;
121121 case DS2_EXCEPTION_UNCAUGHT_WINRT:
122122 return " 0x40080201 (uncaught WinRT exception)" ;
123+ case DS2_EXCEPTION_VC_THREAD_NAME_SET:
124+ return " 0x406D1388 (VC thread name set)" ;
123125 DO_DEFAULT (" unknown exception code" , code)
124126 }
125127}
You can’t perform that action at this time.
0 commit comments