Skip to content

Commit f8474fa

Browse files
committed
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
1 parent 048692e commit f8474fa

File tree

5 files changed

+0
-26
lines changed

5 files changed

+0
-26
lines changed

src/runtime/defs_windows.go

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const (
4949
CONTEXT_FULL = C.CONTEXT_FULL
5050

5151
EXCEPTION_ACCESS_VIOLATION = C.STATUS_ACCESS_VIOLATION
52-
EXCEPTION_BREAKPOINT = C.STATUS_BREAKPOINT
5352
EXCEPTION_FLT_DENORMAL_OPERAND = C.STATUS_FLOAT_DENORMAL_OPERAND
5453
EXCEPTION_FLT_DIVIDE_BY_ZERO = C.STATUS_FLOAT_DIVIDE_BY_ZERO
5554
EXCEPTION_FLT_INEXACT_RESULT = C.STATUS_FLOAT_INEXACT_RESULT

src/runtime/defs_windows_386.h

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ enum {
2222
CONTEXT_FULL = 0x10007,
2323

2424
EXCEPTION_ACCESS_VIOLATION = 0xc0000005,
25-
EXCEPTION_BREAKPOINT = 0x80000003,
2625
EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d,
2726
EXCEPTION_FLT_DIVIDE_BY_ZERO = 0xc000008e,
2827
EXCEPTION_FLT_INEXACT_RESULT = 0xc000008f,

src/runtime/defs_windows_amd64.h

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ enum {
2222
CONTEXT_FULL = 0x10000b,
2323

2424
EXCEPTION_ACCESS_VIOLATION = 0xc0000005,
25-
EXCEPTION_BREAKPOINT = 0x80000003,
2625
EXCEPTION_FLT_DENORMAL_OPERAND = 0xc000008d,
2726
EXCEPTION_FLT_DIVIDE_BY_ZERO = 0xc000008e,
2827
EXCEPTION_FLT_INEXACT_RESULT = 0xc000008f,

src/runtime/os_windows_386.c

-13
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,6 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
5454
if(r->Eip < (uint32)runtime·text || (uint32)runtime·etext < r->Eip)
5555
return 0;
5656

57-
switch(info->ExceptionCode) {
58-
case EXCEPTION_BREAKPOINT:
59-
// It is unclear whether this is needed, unclear whether it
60-
// would work, and unclear how to test it. Leave out for now.
61-
// This only handles breakpoint instructions written in the
62-
// assembly sources, not breakpoints set by a debugger, and
63-
// there are very few of the former.
64-
//
65-
// r->Eip--; // because 8l generates 2 bytes for INT3
66-
// return 0;
67-
break;
68-
}
69-
7057
if(gp != nil && runtime·issigpanic(info->ExceptionCode)) {
7158
// Make it look like a call to the signal func.
7259
// Have to pass arguments out of band since

src/runtime/os_windows_amd64.c

-10
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,6 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
6262
if(r->Rip < (uint64)runtime·text || (uint64)runtime·etext < r->Rip)
6363
return 0;
6464

65-
switch(info->ExceptionCode) {
66-
case EXCEPTION_BREAKPOINT:
67-
// It is unclear whether this is needed, unclear whether it
68-
// would work, and unclear how to test it. Leave out for now.
69-
// This only handles breakpoint instructions written in the
70-
// assembly sources, not breakpoints set by a debugger, and
71-
// there are very few of the former.
72-
break;
73-
}
74-
7565
if(gp != nil && runtime·issigpanic(info->ExceptionCode)) {
7666
// Make it look like a call to the signal func.
7767
// Have to pass arguments out of band since

0 commit comments

Comments
 (0)