]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove useless code around of EXCEPTION_BREAKPOINT
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 19 Sep 2014 01:14:51 +0000 (11:14 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Fri, 19 Sep 2014 01:14:51 +0000 (11:14 +1000)
This is to simplify VEH handler before making
changes to fix issue 8006.

Update #8006

LGTM=adg, rsc
R=golang-codereviews, adg, rsc
CC=golang-codereviews
https://golang.org/cl/138630043

src/runtime/defs_windows.go
src/runtime/defs_windows_386.h
src/runtime/defs_windows_amd64.h
src/runtime/os_windows_386.c
src/runtime/os_windows_amd64.c

index 01aea92dee8503919277908af4ce1ac87d475099..cb0f54d8abbd47e9ee68b593bd66937be9fb9d5f 100644 (file)
@@ -49,7 +49,6 @@ const (
        CONTEXT_FULL    = C.CONTEXT_FULL
 
        EXCEPTION_ACCESS_VIOLATION     = C.STATUS_ACCESS_VIOLATION
-       EXCEPTION_BREAKPOINT           = C.STATUS_BREAKPOINT
        EXCEPTION_FLT_DENORMAL_OPERAND = C.STATUS_FLOAT_DENORMAL_OPERAND
        EXCEPTION_FLT_DIVIDE_BY_ZERO   = C.STATUS_FLOAT_DIVIDE_BY_ZERO
        EXCEPTION_FLT_INEXACT_RESULT   = C.STATUS_FLOAT_INEXACT_RESULT
index db3629a1d200d1863998bc9ea91a3b621d6f4814..295e422c6bacac813953b200a18173b1ced6d3f7 100644 (file)
@@ -22,7 +22,6 @@ enum {
        CONTEXT_FULL    = 0x10007,
 
        EXCEPTION_ACCESS_VIOLATION      = 0xc0000005,
-       EXCEPTION_BREAKPOINT            = 0x80000003,
        EXCEPTION_FLT_DENORMAL_OPERAND  = 0xc000008d,
        EXCEPTION_FLT_DIVIDE_BY_ZERO    = 0xc000008e,
        EXCEPTION_FLT_INEXACT_RESULT    = 0xc000008f,
index fe26f5a84a3e69c6954deb8da87b9d2d882e6fba..2516c84128cba922aceace5468eb6a75f64147d2 100644 (file)
@@ -22,7 +22,6 @@ enum {
        CONTEXT_FULL    = 0x10000b,
 
        EXCEPTION_ACCESS_VIOLATION      = 0xc0000005,
-       EXCEPTION_BREAKPOINT            = 0x80000003,
        EXCEPTION_FLT_DENORMAL_OPERAND  = 0xc000008d,
        EXCEPTION_FLT_DIVIDE_BY_ZERO    = 0xc000008e,
        EXCEPTION_FLT_INEXACT_RESULT    = 0xc000008f,
index 15a5ea5d1f4401568d86786f62c1871bc0091497..028b09bbc885821a21c3bd7d9db3501f8cb6769c 100644 (file)
@@ -54,19 +54,6 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
        if(r->Eip < (uint32)runtime·text || (uint32)runtime·etext < r->Eip)
                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.
-               //
-               // r->Eip--;    // because 8l generates 2 bytes for INT3
-               // return 0;
-               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
index 9a69d73c0786fd82e70f5fb2485e6332c67f8d62..d7b45c5b1d11bb8d34c172c608d837f144e02b85 100644 (file)
@@ -62,16 +62,6 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
        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