mirror of
https://github.com/go-delve/delve.git
synced 2025-11-01 12:01:35 +08:00
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:
@ -193,7 +193,7 @@ starts and attaches to it, and enables you to immediately begin debugging your p
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
for i := range funcs {
|
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 {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user