From 46760aaa1c4fa5853fd6991fb7f37e375aac1d3d Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 2 Dec 2014 16:44:51 -0600 Subject: [PATCH] Rename fn for clarity --- proctl/variables_linux_amd64.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proctl/variables_linux_amd64.go b/proctl/variables_linux_amd64.go index 03d5f32f..00639473 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 -- GitLab