mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
proc: move AllGCache to a common struct
Add a new method "Common" to proc.Process that returns a pointer to a struct that pkg/proc can use to store its things, independently of the backend. This is used here to replace the AllGCache typecasts, it will also be used to store the return values of the stepout breakpoint and the state for injected function calls.
This commit is contained in:
committed by
Alessandro Arzilli
parent
d04c60e0b9
commit
f38a2816d1
@ -62,6 +62,8 @@ type Info interface {
|
||||
ResumeNotify(chan<- struct{})
|
||||
Exited() bool
|
||||
BinInfo() *BinaryInfo
|
||||
// Common returns a struct with fields common to all backends
|
||||
Common() *CommonProcess
|
||||
|
||||
ThreadInfo
|
||||
GoroutineInfo
|
||||
@ -100,3 +102,11 @@ type BreakpointManipulation interface {
|
||||
ClearBreakpoint(addr uint64) (*Breakpoint, error)
|
||||
ClearInternalBreakpoints() error
|
||||
}
|
||||
|
||||
type CommonProcess struct {
|
||||
allGCache []*G
|
||||
}
|
||||
|
||||
func (p *CommonProcess) ClearAllGCache() {
|
||||
p.allGCache = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user