mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
*: Show return values on CLI trace
This patch allows the `trace` CLI subcommand to display return values of a function. Additionally, it will also display information on where the function exited, which could also be helpful in determining the path taken during function execution. Fixes #388
This commit is contained in:
committed by
Alessandro Arzilli
parent
4db9939845
commit
3129aa7330
@ -30,7 +30,8 @@ type Breakpoint struct {
|
||||
Kind BreakpointKind
|
||||
|
||||
// Breakpoint information
|
||||
Tracepoint bool // Tracepoint flag
|
||||
Tracepoint bool // Tracepoint flag
|
||||
TraceReturn bool
|
||||
Goroutine bool // Retrieve goroutine information
|
||||
Stacktrace int // Number of stack frames to retrieve
|
||||
Variables []string // Variables to evaluate
|
||||
@ -45,7 +46,7 @@ type Breakpoint struct {
|
||||
// Next uses NextDeferBreakpoints for the breakpoint it sets on the
|
||||
// deferred function, DeferReturns is populated with the
|
||||
// addresses of calls to runtime.deferreturn in the current
|
||||
// function. This insures that the breakpoint on the deferred
|
||||
// function. This ensures that the breakpoint on the deferred
|
||||
// function only triggers on panic or on the defer call to
|
||||
// the function, not when the function is called directly
|
||||
DeferReturns []uint64
|
||||
|
||||
Reference in New Issue
Block a user