Commit f8474fa0 authored by Alex Brainman's avatar Alex Brainman

runtime: remove useless code around of EXCEPTION_BREAKPOINT

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
parent 048692e5
......@@ -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
......
......@@ -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,
......
......@@ -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,
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment