mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 02:07:58 +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
@ -12,10 +12,10 @@ import (
|
||||
func (p *nativeProcess) MemoryMap() ([]proc.MemoryMapEntry, error) {
|
||||
const VmFlagsPrefix = "VmFlags:"
|
||||
|
||||
smapsbuf, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/smaps", p.Pid()))
|
||||
smapsbuf, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/smaps", p.pid))
|
||||
if err != nil {
|
||||
// Older versions of Linux don't have smaps but have maps which is in a similar format.
|
||||
smapsbuf, err = ioutil.ReadFile(fmt.Sprintf("/proc/%d/maps", p.Pid()))
|
||||
smapsbuf, err = ioutil.ReadFile(fmt.Sprintf("/proc/%d/maps", p.pid))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user