summaryrefslogtreecommitdiff
path: root/src/runtime/os_windows_amd64.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/os_windows_amd64.c')
-rw-r--r--src/runtime/os_windows_amd64.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/runtime/os_windows_amd64.c b/src/runtime/os_windows_amd64.c
index 9a69d73c0..261880d45 100644
--- a/src/runtime/os_windows_amd64.c
+++ b/src/runtime/os_windows_amd64.c
@@ -32,8 +32,6 @@ runtime·dumpregs(Context *r)
runtime·printf("gs %X\n", (uint64)r->SegGs);
}
-#define DBG_PRINTEXCEPTION_C 0x40010006
-
// Called by sigtramp from Windows VEH handler.
// Return value signals whether the exception has been handled (-1)
// or should be made available to other handlers in the chain (0).
@@ -44,34 +42,11 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
uintptr *sp;
extern byte runtime·text[], runtime·etext[];
- if(info->ExceptionCode == DBG_PRINTEXCEPTION_C) {
- // This exception is intended to be caught by debuggers.
- // There is a not-very-informational message like
- // "Invalid parameter passed to C runtime function"
- // sitting at info->ExceptionInformation[0] (a wchar_t*),
- // with length info->ExceptionInformation[1].
- // The default behavior is to ignore this exception,
- // but somehow returning 0 here (meaning keep going)
- // makes the program crash instead. Maybe Windows has no
- // other handler registered? In any event, ignore it.
- return -1;
- }
-
// Only handle exception if executing instructions in Go binary
// (not Windows library code).
if(r->Rip < (uint64)runtime·text || (uint64)runtime·etext < r->Rip)
return 0;
- switch(info->ExceptionCode) {
- case EXCEPTION_BREAKPOINT:
- // It is unclear whether this is needed, unclear whether it
- // would work, and unclear how to test it. Leave out for now.
- // This only handles breakpoint instructions written in the
- // assembly sources, not breakpoints set by a debugger, and
- // there are very few of the former.
- break;
- }
-
if(gp != nil && runtime·issigpanic(info->ExceptionCode)) {
// Make it look like a call to the signal func.
// Have to pass arguments out of band since