Docs: Update Documentation/cli/README.md. (#549)
* Docs: Update Documentation/cli/README.md.
This commit is contained in:
parent
7f6d7e214d
commit
fa1db367fe
@ -2,47 +2,46 @@
|
|||||||
|
|
||||||
Command | Description
|
Command | Description
|
||||||
--------|------------
|
--------|------------
|
||||||
[help](#help) | Prints the help message.
|
[args](#args) | Print function arguments.
|
||||||
[break](#break) | Sets a breakpoint.
|
[break](#break) | Sets a breakpoint.
|
||||||
[trace](#trace) | Set tracepoint.
|
[breakpoints](#breakpoints) | Print out info for active breakpoints.
|
||||||
[restart](#restart) | Restart process.
|
|
||||||
[continue](#continue) | Run until breakpoint or program termination.
|
|
||||||
[step](#step) | Single step through program.
|
|
||||||
[step-instruction](#step-instruction) | Single step a single cpu instruction.
|
|
||||||
[next](#next) | Step over to next source line.
|
|
||||||
[threads](#threads) | Print out info for every traced thread.
|
|
||||||
[thread](#thread) | Switch to the specified thread.
|
|
||||||
[clear](#clear) | Deletes breakpoint.
|
[clear](#clear) | Deletes breakpoint.
|
||||||
[clearall](#clearall) | Deletes multiple breakpoints.
|
[clearall](#clearall) | Deletes multiple breakpoints.
|
||||||
[goroutines](#goroutines) | List program goroutines.
|
|
||||||
[goroutine](#goroutine) | Shows or changes current goroutine
|
|
||||||
[breakpoints](#breakpoints) | Print out info for active breakpoints.
|
|
||||||
[print](#print) | Evaluate an expression.
|
|
||||||
[set](#set) | Changes the value of a variable.
|
|
||||||
[sources](#sources) | Print list of source files.
|
|
||||||
[funcs](#funcs) | Print list of functions.
|
|
||||||
[types](#types) | Print list of types
|
|
||||||
[args](#args) | Print function arguments.
|
|
||||||
[locals](#locals) | Print local variables.
|
|
||||||
[vars](#vars) | Print package variables.
|
|
||||||
[regs](#regs) | Print contents of CPU registers.
|
|
||||||
[exit](#exit) | Exit the debugger.
|
|
||||||
[list](#list) | Show source code.
|
|
||||||
[stack](#stack) | Print stack trace.
|
|
||||||
[frame](#frame) | Executes command on a different frame.
|
|
||||||
[source](#source) | Executes a file containing a list of delve commands
|
|
||||||
[disassemble](#disassemble) | Disassembler.
|
|
||||||
[on](#on) | Executes a command when a breakpoint is hit.
|
|
||||||
[condition](#condition) | Set breakpoint condition.
|
[condition](#condition) | Set breakpoint condition.
|
||||||
|
[continue](#continue) | Run until breakpoint or program termination.
|
||||||
|
[disassemble](#disassemble) | Disassembler.
|
||||||
|
[exit](#exit) | Exit the debugger.
|
||||||
|
[frame](#frame) | Executes command on a different frame.
|
||||||
|
[funcs](#funcs) | Print list of functions.
|
||||||
|
[goroutine](#goroutine) | Shows or changes current goroutine
|
||||||
|
[goroutines](#goroutines) | List program goroutines.
|
||||||
|
[help](#help) | Prints the help message.
|
||||||
|
[list](#list) | Show source code.
|
||||||
|
[locals](#locals) | Print local variables.
|
||||||
|
[next](#next) | Step over to next source line.
|
||||||
|
[on](#on) | Executes a command when a breakpoint is hit.
|
||||||
|
[print](#print) | Evaluate an expression.
|
||||||
|
[regs](#regs) | Print contents of CPU registers.
|
||||||
|
[restart](#restart) | Restart process.
|
||||||
|
[set](#set) | Changes the value of a variable.
|
||||||
|
[source](#source) | Executes a file containing a list of delve commands
|
||||||
|
[sources](#sources) | Print list of source files.
|
||||||
|
[stack](#stack) | Print stack trace.
|
||||||
|
[step](#step) | Single step through program.
|
||||||
|
[step-instruction](#step-instruction) | Single step a single cpu instruction.
|
||||||
|
[thread](#thread) | Switch to the specified thread.
|
||||||
|
[threads](#threads) | Print out info for every traced thread.
|
||||||
|
[trace](#trace) | Set tracepoint.
|
||||||
|
[types](#types) | Print list of types
|
||||||
|
[vars](#vars) | Print package variables.
|
||||||
|
|
||||||
## help
|
## args
|
||||||
Prints the help message.
|
Print function arguments.
|
||||||
|
|
||||||
help [command]
|
[goroutine <n>] [frame <m>] args [-v] [<regex>]
|
||||||
|
|
||||||
Type "help" followed by the name of a command for more information about it.
|
If regex is specified only function arguments with a name matching it will be returned. If -v is specified more information about each function argument will be shown.
|
||||||
|
|
||||||
Aliases: h
|
|
||||||
|
|
||||||
## break
|
## break
|
||||||
Sets a breakpoint.
|
Sets a breakpoint.
|
||||||
@ -55,52 +54,10 @@ See also: "help on", "help cond" and "help clear"
|
|||||||
|
|
||||||
Aliases: b
|
Aliases: b
|
||||||
|
|
||||||
## trace
|
## breakpoints
|
||||||
Set tracepoint.
|
Print out info for active breakpoints.
|
||||||
|
|
||||||
trace [name] <linespec>
|
Aliases: bp
|
||||||
|
|
||||||
A tracepoint is a breakpoint that does not stop the execution of the program, instead when the tracepoint is hit a notification is displayed. See [Documentation/cli/locspec.md](//github.com/derekparker/delve/tree/master/Documentation/cli/locspec.md) for the syntax of linespec.
|
|
||||||
|
|
||||||
See also: "help on", "help cond" and "help clear"
|
|
||||||
|
|
||||||
Aliases: t
|
|
||||||
|
|
||||||
## restart
|
|
||||||
Restart process.
|
|
||||||
|
|
||||||
Aliases: r
|
|
||||||
|
|
||||||
## continue
|
|
||||||
Run until breakpoint or program termination.
|
|
||||||
|
|
||||||
Aliases: c
|
|
||||||
|
|
||||||
## step
|
|
||||||
Single step through program.
|
|
||||||
|
|
||||||
Aliases: s
|
|
||||||
|
|
||||||
## step-instruction
|
|
||||||
Single step a single cpu instruction.
|
|
||||||
|
|
||||||
Aliases: si
|
|
||||||
|
|
||||||
## next
|
|
||||||
Step over to next source line.
|
|
||||||
|
|
||||||
Aliases: n
|
|
||||||
|
|
||||||
## threads
|
|
||||||
Print out info for every traced thread.
|
|
||||||
|
|
||||||
|
|
||||||
## thread
|
|
||||||
Switch to the specified thread.
|
|
||||||
|
|
||||||
thread <id>
|
|
||||||
|
|
||||||
Aliases: tr
|
|
||||||
|
|
||||||
## clear
|
## clear
|
||||||
Deletes breakpoint.
|
Deletes breakpoint.
|
||||||
@ -116,6 +73,63 @@ Deletes multiple breakpoints.
|
|||||||
If called with the linespec argument it will delete all the breakpoints matching the linespec. If linespec is omitted all breakpoints are deleted.
|
If called with the linespec argument it will delete all the breakpoints matching the linespec. If linespec is omitted all breakpoints are deleted.
|
||||||
|
|
||||||
|
|
||||||
|
## condition
|
||||||
|
Set breakpoint condition.
|
||||||
|
|
||||||
|
condition <breakpoint name or id> <boolean expression>.
|
||||||
|
|
||||||
|
Specifies that the breakpoint or tracepoint should break only if the boolean expression is true.
|
||||||
|
|
||||||
|
Aliases: cond
|
||||||
|
|
||||||
|
## continue
|
||||||
|
Run until breakpoint or program termination.
|
||||||
|
|
||||||
|
Aliases: c
|
||||||
|
|
||||||
|
## disassemble
|
||||||
|
Disassembler.
|
||||||
|
|
||||||
|
[goroutine <n>] [frame <m>] disassemble [-a <start> <end>] [-l <locspec>]
|
||||||
|
|
||||||
|
If no argument is specified the function being executed in the selected stack frame will be executed.
|
||||||
|
|
||||||
|
-a <start> <end> disassembles the specified address range
|
||||||
|
-l <locspec> disassembles the specified function
|
||||||
|
|
||||||
|
Aliases: disass
|
||||||
|
|
||||||
|
## exit
|
||||||
|
Exit the debugger.
|
||||||
|
|
||||||
|
Aliases: quit q
|
||||||
|
|
||||||
|
## frame
|
||||||
|
Executes command on a different frame.
|
||||||
|
|
||||||
|
frame <frame index> <command>.
|
||||||
|
|
||||||
|
|
||||||
|
## funcs
|
||||||
|
Print list of functions.
|
||||||
|
|
||||||
|
funcs [<regex>]
|
||||||
|
|
||||||
|
If regex is specified only the functions matching it will be returned.
|
||||||
|
|
||||||
|
|
||||||
|
## goroutine
|
||||||
|
Shows or changes current goroutine
|
||||||
|
|
||||||
|
goroutine
|
||||||
|
goroutine <id>
|
||||||
|
goroutine <id> <command>
|
||||||
|
|
||||||
|
Called without arguments it will show information about the current goroutine.
|
||||||
|
Called with a single argument it will switch to the specified goroutine.
|
||||||
|
Called with more arguments it will execute a command on the specified goroutine.
|
||||||
|
|
||||||
|
|
||||||
## goroutines
|
## goroutines
|
||||||
List program goroutines.
|
List program goroutines.
|
||||||
|
|
||||||
@ -130,96 +144,14 @@ Print out info for every goroutine. The flag controls what information is shown
|
|||||||
If no flag is specified the default is -u.
|
If no flag is specified the default is -u.
|
||||||
|
|
||||||
|
|
||||||
## goroutine
|
## help
|
||||||
Shows or changes current goroutine
|
Prints the help message.
|
||||||
|
|
||||||
goroutine
|
help [command]
|
||||||
goroutine <id>
|
|
||||||
goroutine <id> <command>
|
Type "help" followed by the name of a command for more information about it.
|
||||||
|
|
||||||
Called without arguments it will show information about the current goroutine.
|
Aliases: h
|
||||||
Called with a single argument it will switch to the specified goroutine.
|
|
||||||
Called with more arguments it will execute a command on the specified goroutine.
|
|
||||||
|
|
||||||
|
|
||||||
## breakpoints
|
|
||||||
Print out info for active breakpoints.
|
|
||||||
|
|
||||||
Aliases: bp
|
|
||||||
|
|
||||||
## print
|
|
||||||
Evaluate an expression.
|
|
||||||
|
|
||||||
[goroutine <n>] [frame <m>] print <expression>
|
|
||||||
|
|
||||||
See [Documentation/cli/expr.md](//github.com/derekparker/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions.
|
|
||||||
|
|
||||||
Aliases: p
|
|
||||||
|
|
||||||
## set
|
|
||||||
Changes the value of a variable.
|
|
||||||
|
|
||||||
[goroutine <n>] [frame <m>] set <variable> = <value>
|
|
||||||
|
|
||||||
See [Documentation/cli/expr.md](//github.com/derekparker/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions. Only numerical variables and pointers can be changed.
|
|
||||||
|
|
||||||
|
|
||||||
## sources
|
|
||||||
Print list of source files.
|
|
||||||
|
|
||||||
sources [<regex>]
|
|
||||||
|
|
||||||
If regex is specified only the source files matching it will be returned.
|
|
||||||
|
|
||||||
|
|
||||||
## funcs
|
|
||||||
Print list of functions.
|
|
||||||
|
|
||||||
funcs [<regex>]
|
|
||||||
|
|
||||||
If regex is specified only the functions matching it will be returned.
|
|
||||||
|
|
||||||
|
|
||||||
## types
|
|
||||||
Print list of types
|
|
||||||
|
|
||||||
types [<regex>]
|
|
||||||
|
|
||||||
If regex is specified only the functions matching it will be returned.
|
|
||||||
|
|
||||||
|
|
||||||
## args
|
|
||||||
Print function arguments.
|
|
||||||
|
|
||||||
[goroutine <n>] [frame <m>] args [-v] [<regex>]
|
|
||||||
|
|
||||||
If regex is specified only function arguments with a name matching it will be returned. If -v is specified more information about each function argument will be shown.
|
|
||||||
|
|
||||||
|
|
||||||
## locals
|
|
||||||
Print local variables.
|
|
||||||
|
|
||||||
[goroutine <n>] [frame <m>] locals [-v] [<regex>]
|
|
||||||
|
|
||||||
If regex is specified only local variables with a name matching it will be returned. If -v is specified more information about each local variable will be shown.
|
|
||||||
|
|
||||||
|
|
||||||
## vars
|
|
||||||
Print package variables.
|
|
||||||
|
|
||||||
vars [-v] [<regex>]
|
|
||||||
|
|
||||||
If regex is specified only package variables with a name matching it will be returned. If -v is specified more information about each package variable will be shown.
|
|
||||||
|
|
||||||
|
|
||||||
## regs
|
|
||||||
Print contents of CPU registers.
|
|
||||||
|
|
||||||
|
|
||||||
## exit
|
|
||||||
Exit the debugger.
|
|
||||||
|
|
||||||
Aliases: quit q
|
|
||||||
|
|
||||||
## list
|
## list
|
||||||
Show source code.
|
Show source code.
|
||||||
@ -230,38 +162,18 @@ Show source around current point or provided linespec.
|
|||||||
|
|
||||||
Aliases: ls
|
Aliases: ls
|
||||||
|
|
||||||
## stack
|
## locals
|
||||||
Print stack trace.
|
Print local variables.
|
||||||
|
|
||||||
[goroutine <n>] [frame <m>] stack [<depth>] [-full]
|
[goroutine <n>] [frame <m>] locals [-v] [<regex>]
|
||||||
|
|
||||||
If -full is specified every stackframe will be decorated by the value of its local variables and function arguments.
|
If regex is specified only local variables with a name matching it will be returned. If -v is specified more information about each local variable will be shown.
|
||||||
|
|
||||||
Aliases: bt
|
|
||||||
|
|
||||||
## frame
|
|
||||||
Executes command on a different frame.
|
|
||||||
|
|
||||||
frame <frame index> <command>.
|
|
||||||
|
|
||||||
|
|
||||||
## source
|
## next
|
||||||
Executes a file containing a list of delve commands
|
Step over to next source line.
|
||||||
|
|
||||||
source <path>
|
Aliases: n
|
||||||
|
|
||||||
|
|
||||||
## disassemble
|
|
||||||
Disassembler.
|
|
||||||
|
|
||||||
[goroutine <n>] [frame <m>] disassemble [-a <start> <end>] [-l <locspec>]
|
|
||||||
|
|
||||||
If no argument is specified the function being executed in the selected stack frame will be executed.
|
|
||||||
|
|
||||||
-a <start> <end> disassembles the specified address range
|
|
||||||
-l <locspec> disassembles the specified function
|
|
||||||
|
|
||||||
Aliases: disass
|
|
||||||
|
|
||||||
## on
|
## on
|
||||||
Executes a command when a breakpoint is hit.
|
Executes a command when a breakpoint is hit.
|
||||||
@ -271,12 +183,98 @@ Executes a command when a breakpoint is hit.
|
|||||||
Supported commands: print, stack and goroutine)
|
Supported commands: print, stack and goroutine)
|
||||||
|
|
||||||
|
|
||||||
## condition
|
## print
|
||||||
Set breakpoint condition.
|
Evaluate an expression.
|
||||||
|
|
||||||
condition <breakpoint name or id> <boolean expression>.
|
[goroutine <n>] [frame <m>] print <expression>
|
||||||
|
|
||||||
|
See [Documentation/cli/expr.md](//github.com/derekparker/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions.
|
||||||
|
|
||||||
|
Aliases: p
|
||||||
|
|
||||||
|
## regs
|
||||||
|
Print contents of CPU registers.
|
||||||
|
|
||||||
|
|
||||||
|
## restart
|
||||||
|
Restart process.
|
||||||
|
|
||||||
|
Aliases: r
|
||||||
|
|
||||||
|
## set
|
||||||
|
Changes the value of a variable.
|
||||||
|
|
||||||
|
[goroutine <n>] [frame <m>] set <variable> = <value>
|
||||||
|
|
||||||
|
See [Documentation/cli/expr.md](//github.com/derekparker/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions. Only numerical variables and pointers can be changed.
|
||||||
|
|
||||||
|
|
||||||
|
## source
|
||||||
|
Executes a file containing a list of delve commands
|
||||||
|
|
||||||
|
source <path>
|
||||||
|
|
||||||
|
|
||||||
|
## sources
|
||||||
|
Print list of source files.
|
||||||
|
|
||||||
|
sources [<regex>]
|
||||||
|
|
||||||
|
If regex is specified only the source files matching it will be returned.
|
||||||
|
|
||||||
|
|
||||||
|
## stack
|
||||||
|
Print stack trace.
|
||||||
|
|
||||||
|
[goroutine <n>] [frame <m>] stack [<depth>] [-full]
|
||||||
|
|
||||||
|
If -full is specified every stackframe will be decorated by the value of its local variables and function arguments.
|
||||||
|
|
||||||
|
Aliases: bt
|
||||||
|
|
||||||
|
## step
|
||||||
|
Single step through program.
|
||||||
|
|
||||||
|
Aliases: s
|
||||||
|
|
||||||
|
## step-instruction
|
||||||
|
Single step a single cpu instruction.
|
||||||
|
|
||||||
|
Aliases: si
|
||||||
|
|
||||||
|
## thread
|
||||||
|
Switch to the specified thread.
|
||||||
|
|
||||||
|
thread <id>
|
||||||
|
|
||||||
|
Aliases: tr
|
||||||
|
|
||||||
|
## threads
|
||||||
|
Print out info for every traced thread.
|
||||||
|
|
||||||
|
|
||||||
|
## trace
|
||||||
|
Set tracepoint.
|
||||||
|
|
||||||
|
trace [name] <linespec>
|
||||||
|
|
||||||
Specifies that the breakpoint or tracepoint should break only if the boolean expression is true.
|
A tracepoint is a breakpoint that does not stop the execution of the program, instead when the tracepoint is hit a notification is displayed. See [Documentation/cli/locspec.md](//github.com/derekparker/delve/tree/master/Documentation/cli/locspec.md) for the syntax of linespec.
|
||||||
|
|
||||||
Aliases: cond
|
See also: "help on", "help cond" and "help clear"
|
||||||
|
|
||||||
|
Aliases: t
|
||||||
|
|
||||||
|
## types
|
||||||
|
Print list of types
|
||||||
|
|
||||||
|
types [<regex>]
|
||||||
|
|
||||||
|
If regex is specified only the functions matching it will be returned.
|
||||||
|
|
||||||
|
|
||||||
|
## vars
|
||||||
|
Print package variables.
|
||||||
|
|
||||||
|
vars [-v] [<regex>]
|
||||||
|
|
||||||
|
If regex is specified only package variables with a name matching it will be returned. If -v is specified more information about each package variable will be shown.
|
||||||
|
Loading…
Reference in New Issue
Block a user