forked from go-delve/delve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
_scripts: auto check that pkg/proc and runtime are synchronized (go-d…
…elve#2557) Adds a script that check automatically that the the assumptions that pkg/proc makes about runtime are met by the actual runtime, using a combination of parsing and magic comments. Also emits a file describing all the struct fields, constants and variables of the runtime that we use in pkg/proc.
- Loading branch information
Showing
8 changed files
with
800 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
var firstmoduledata moduledata | ||
|
||
var debug anytype | ||
|
||
type _defer struct { | ||
fn anytype | ||
pc uintptr | ||
sp uintptr | ||
siz int32 (optional) | ||
link *_defer | ||
} | ||
|
||
type bmap struct { | ||
tophash [8]uint8 | ||
} | ||
|
||
type eface struct { | ||
_type *_type | ||
data unsafe.Pointer | ||
} | ||
|
||
type g struct { | ||
sched gobuf | ||
goid int64 | ||
gopc uintptr | ||
startpc uintptr | ||
waitsince int64 | ||
waitreason waitReason (optional) | ||
stack stack | ||
atomicstatus uint32 | ||
} | ||
|
||
type gobuf struct { | ||
pc uintptr | ||
sp uintptr | ||
bp uintptr (optional) | ||
lr uintptr (optional) | ||
} | ||
|
||
type hmap struct { | ||
count int | ||
B uint8 | ||
buckets unsafe.Pointer | ||
oldbuckets unsafe.Pointer | ||
} | ||
|
||
type iface struct { | ||
tab *itab | ||
data unsafe.Pointer | ||
} | ||
|
||
type itab struct { | ||
_type *_type | ||
} | ||
|
||
type moduledata struct { | ||
text uintptr | ||
types uintptr | ||
} | ||
|
||
type stack struct { | ||
hi uintptr | ||
lo uintptr | ||
} | ||
|
||
const emptyOne = 1 | ||
|
||
const emptyRest = 0 | ||
|
||
const kindDirectIface = 32 | ||
|
||
const kindGCProg = 64 | ||
|
||
const kindMask = 31 | ||
|
||
const minTopHash = 4 | ||
or const minTopHash = 5 | ||
|
Oops, something went wrong.