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

Function FindLibInMaps

user/event/event_mmap2.go:470–489  ·  view source on GitHub ↗
(pid uint32, brk_lib string)

Source from the content-addressed store, hash-verified

468}
469
470func FindLibInMaps(pid uint32, brk_lib string) (LibInfo, error) {
471 var info LibInfo
472 pid_maps, err := maps_helper.FindLib(pid)
473 if err != nil {
474 return info, err
475 }
476 for _, lib_infos := range pid_maps {
477 for _, lib_info := range lib_infos {
478 if brk_lib == lib_info.LibPath {
479 info = lib_info
480 break
481 }
482 if brk_lib == lib_info.LibName {
483 info = lib_info
484 break
485 }
486 }
487 }
488 return info, err
489}
490
491func CacheMaps(pid uint32) {
492 maps_lock.Lock()

Callers 1

persistentPreRunEFuncFunction · 0.92

Calls 1

FindLibMethod · 0.80

Tested by

no test coverage detected