MCPcopy Create free account
hub / github.com/google/pprof / findExe

Function findExe

internal/binutils/binutils.go:247–255  ·  view source on GitHub ↗

findExe looks for an executable command on a set of paths. If it cannot find it, returns cmd.

(cmd string, paths []string)

Source from the content-addressed store, hash-verified

245// findExe looks for an executable command on a set of paths.
246// If it cannot find it, returns cmd.
247func findExe(cmd string, paths []string) (string, bool) {
248 for _, p := range paths {
249 cp := filepath.Join(p, cmd)
250 if c, err := exec.LookPath(cp); err == nil {
251 return c, true
252 }
253 }
254 return cmd, false
255}
256
257// Disasm returns the assembly instructions for the specified address range
258// of a binary.

Callers 2

findObjdumpFunction · 0.85
chooseExeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…