MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / FindLib

Method FindLib

user/event/event_mmap2.go:106–121  ·  view source on GitHub ↗
(pid uint32)

Source from the content-addressed store, hash-verified

104 this.child_parent_map = make(map[uint32]uint32)
105}
106func (this *MapsHelper) FindLib(pid uint32) (ProcMaps, error) {
107 maps_lock.Lock()
108 defer maps_lock.Unlock()
109 pid_maps, ok := this.pid_maps[pid]
110 if !ok {
111 err := this.ParseMaps(pid, false)
112 if err != nil {
113 return nil, err
114 }
115 pid_maps, ok = this.pid_maps[pid]
116 if !ok {
117 return nil, errors.New("get ProcMaps by pid failed")
118 }
119 }
120 return pid_maps.Clone(), nil
121}
122
123func FindLibPaths(pid uint32) ([]string, error) {
124 var search_paths []string

Callers 2

FindLibPathsFunction · 0.80
FindLibInMapsFunction · 0.80

Calls 2

ParseMapsMethod · 0.95
CloneMethod · 0.65

Tested by

no test coverage detected