From ae6a5f503cfe94c8e4cf66d71a918771e0119a06 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Sun, 31 Jan 2016 13:35:18 +0100 Subject: [PATCH] cmd/dlv/main: trace subcommand shows duplicate entries The tracepoint should be set on the function's first line, not the function's entry point to avoid function prologue weirdness. Fixes #389 --- cmd/dlv/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/dlv/main.go b/cmd/dlv/main.go index da245f0b..9b197044 100644 --- a/cmd/dlv/main.go +++ b/cmd/dlv/main.go @@ -193,7 +193,7 @@ starts and attaches to it, and enables you to immediately begin debugging your p return 1 } for i := range funcs { - _, err := client.CreateBreakpoint(&api.Breakpoint{FunctionName: funcs[i], Tracepoint: true}) + _, err := client.CreateBreakpoint(&api.Breakpoint{FunctionName: funcs[i], Line: -1, Tracepoint: true}) if err != nil { fmt.Fprintln(os.Stderr, err) return 1