mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 20:20:40 +08:00
proc/*: minor miscellaneous code cleanups (#2790)
* made Pid a method of Target instead of a method of Process * changed argument of NewTarget to ProcessInternal, since that's the interface that backends have to implement * removed warnings about ProcessInternal since there is no way for users of pkg/proc to access those methods anyway * made RecordingManipulation an optional interface for backends, Target supplies its own dummy implementation when the backend doesn't * inlined small interfaces that only existed to be inlined in proc.Process anyway * removed unused function findExecutable in the Windows and no-native darwin backends * removed (*EvalScope).EvalVariable, an old synonym for EvalExpression
This commit is contained in:
committed by
GitHub
parent
88dca53e5c
commit
01b01423ae
@ -164,8 +164,6 @@ type process struct {
|
||||
breakpoints proc.BreakpointMap
|
||||
}
|
||||
|
||||
var _ proc.ProcessInternal = &process{}
|
||||
|
||||
// thread represents a thread in the core file being debugged.
|
||||
type thread struct {
|
||||
th osThread
|
||||
@ -222,7 +220,7 @@ func OpenCore(corePath, exePath string, debugInfoDirs []string) (*proc.Target, e
|
||||
return nil, ErrNoThreads
|
||||
}
|
||||
|
||||
return proc.NewTarget(p, currentThread, proc.NewTargetConfig{
|
||||
return proc.NewTarget(p, p.pid, currentThread, proc.NewTargetConfig{
|
||||
Path: exePath,
|
||||
DebugInfoDirs: debugInfoDirs,
|
||||
DisableAsyncPreempt: false,
|
||||
@ -459,11 +457,6 @@ func (p *process) Valid() (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Pid returns the process ID of this process.
|
||||
func (p *process) Pid() int {
|
||||
return p.pid
|
||||
}
|
||||
|
||||
// ResumeNotify is a no-op on core files as we cannot
|
||||
// control execution.
|
||||
func (p *process) ResumeNotify(chan<- struct{}) {
|
||||
|
||||
Reference in New Issue
Block a user