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
This commit is contained in:
aarzilli 2016-01-31 13:35:18 +01:00
parent 975a114c0f
commit ae6a5f503c

@ -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