(pid uint32)
| 104 | this.child_parent_map = make(map[uint32]uint32) |
| 105 | } |
| 106 | func (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 | |
| 123 | func FindLibPaths(pid uint32) ([]string, error) { |
| 124 | var search_paths []string |
no test coverage detected