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
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
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,
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,
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
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