diff --git a/proctl/variables_linux_amd64.go b/proctl/variables_linux_amd64.go index 03d5f32f1c762445dd2b89b4bd5a11c93377db31..00639473ded9141520d7cce0d2214288a3244c53 100644 --- a/proctl/variables_linux_amd64.go +++ b/proctl/variables_linux_amd64.go @@ -319,7 +319,7 @@ func (thread *ThreadContext) EvalSymbol(name string) (*Variable, error) { return nil, fmt.Errorf("could not func function scope") } reader := data.Reader() - if err = findFunction(fn.Name, reader); err != nil { + if err = seekToFunctionEntry(fn.Name, reader); err != nil { return nil, err } @@ -351,11 +351,11 @@ func (thread *ThreadContext) EvalSymbol(name string) (*Variable, error) { return &Variable{Name: name, Type: t.String(), Value: val}, nil } -// findFunction is basically used to seek the dwarf.Reader to +// seekToFunctionEntry is basically used to seek the dwarf.Reader to // the function entry that represents our current scope. From there // we can find the first child entry that matches the var name and // use it to determine the value of the variable. -func findFunction(name string, reader *dwarf.Reader) error { +func seekToFunctionEntry(name string, reader *dwarf.Reader) error { for entry, err := reader.Next(); entry != nil; entry, err = reader.Next() { if err != nil { return err