提交 fa1db367 编写于 作者: N Nan Xiao 提交者: Derek Parker

Docs: Update Documentation/cli/README.md. (#549)

* Docs: Update Documentation/cli/README.md.
上级 7f6d7e21
......@@ -2,47 +2,46 @@
Command | Description
--------|------------
[help](#help) | Prints the help message.
[args](#args) | Print function arguments.
[break](#break) | Sets a breakpoint.
[trace](#trace) | Set tracepoint.
[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.
[breakpoints](#breakpoints) | Print out info for active breakpoints.
[clear](#clear) | Deletes breakpoint.
[clearall](#clearall) | Deletes multiple breakpoints.
[goroutines](#goroutines) | List program goroutines.
[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
[breakpoints](#breakpoints) | Print out info for active breakpoints.
[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.
[funcs](#funcs) | Print list of functions.
[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
[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.
## help
Prints the help message.
## args
Print function arguments.
help [command]
Type "help" followed by the name of a command for more information about it.
[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.
Aliases: h
## break
Sets a breakpoint.
......@@ -55,79 +54,68 @@ See also: "help on", "help cond" and "help clear"
Aliases: b
## trace
Set tracepoint.
trace [name] <linespec>
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.
## breakpoints
Print out info for active breakpoints.
Aliases: r
Aliases: bp
## continue
Run until breakpoint or program termination.
## clear
Deletes breakpoint.
Aliases: c
clear <breakpoint name or id>
## step
Single step through program.
Aliases: s
## clearall
Deletes multiple breakpoints.
## step-instruction
Single step a single cpu instruction.
clearall [<linespec>]
If called with the linespec argument it will delete all the breakpoints matching the linespec. If linespec is omitted all breakpoints are deleted.
Aliases: si
## next
Step over to next source line.
## condition
Set breakpoint condition.
Aliases: n
condition <breakpoint name or id> <boolean expression>.
Specifies that the breakpoint or tracepoint should break only if the boolean expression is true.
## threads
Print out info for every traced thread.
Aliases: cond
## continue
Run until breakpoint or program termination.
## thread
Switch to the specified thread.
Aliases: c
thread <id>
## disassemble
Disassembler.
Aliases: tr
[goroutine <n>] [frame <m>] disassemble [-a <start> <end>] [-l <locspec>]
## clear
Deletes breakpoint.
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
clear <breakpoint name or id>
Aliases: disass
## exit
Exit the debugger.
## clearall
Deletes multiple breakpoints.
Aliases: quit q
clearall [<linespec>]
If called with the linespec argument it will delete all the breakpoints matching the linespec. If linespec is omitted all breakpoints are deleted.
## frame
Executes command on a different frame.
frame <frame index> <command>.
## goroutines
List program goroutines.
goroutines [-u (default: user location)|-r (runtime location)|-g (go statement location)]
## funcs
Print list of functions.
Print out info for every goroutine. The flag controls what information is shown along with each goroutine:
funcs [<regex>]
-u displays location of topmost stackframe in user code
-r displays location of topmost stackframe (including frames inside private runtime functions)
-g displays location of go instruction that created the goroutine
If no flag is specified the default is -u.
If regex is specified only the functions matching it will be returned.
## goroutine
......@@ -142,93 +130,98 @@ 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.
## goroutines
List program goroutines.
[goroutine <n>] [frame <m>] print <expression>
goroutines [-u (default: user location)|-r (runtime location)|-g (go statement location)]
See [Documentation/cli/expr.md](//github.com/derekparker/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions.
Print out info for every goroutine. The flag controls what information is shown along with each goroutine:
Aliases: p
-u displays location of topmost stackframe in user code
-r displays location of topmost stackframe (including frames inside private runtime functions)
-g displays location of go instruction that created the goroutine
If no flag is specified the default is -u.
## set
Changes the value of a variable.
[goroutine <n>] [frame <m>] set <variable> = <value>
## help
Prints the help message.
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.
help [command]
Type "help" followed by the name of a command for more information about it.
Aliases: h
## sources
Print list of source files.
## list
Show source code.
sources [<regex>]
[goroutine <n>] [frame <m>] list [<linespec>]
If regex is specified only the source files matching it will be returned.
Show source around current point or provided linespec.
Aliases: ls
## funcs
Print list of functions.
## locals
Print local variables.
funcs [<regex>]
[goroutine <n>] [frame <m>] locals [-v] [<regex>]
If regex is specified only the functions matching it will be returned.
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.
## types
Print list of types
## next
Step over to next source line.
types [<regex>]
Aliases: n
If regex is specified only the functions matching it will be returned.
## on
Executes a command when a breakpoint is hit.
on <breakpoint name or id> <command>.
Supported commands: print, stack and goroutine)
## args
Print function arguments.
[goroutine <n>] [frame <m>] args [-v] [<regex>]
## print
Evaluate an expression.
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.
[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.
## locals
Print local variables.
Aliases: p
[goroutine <n>] [frame <m>] locals [-v] [<regex>]
## regs
Print contents of CPU registers.
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.
## restart
Restart process.
## vars
Print package variables.
Aliases: r
vars [-v] [<regex>]
## set
Changes the value of a variable.
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.
[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.
## regs
Print contents of CPU registers.
## source
Executes a file containing a list of delve commands
## exit
Exit the debugger.
source <path>
Aliases: quit q
## list
Show source code.
## sources
Print list of source files.
[goroutine <n>] [frame <m>] list [<linespec>]
sources [<regex>]
Show source around current point or provided linespec.
If regex is specified only the source files matching it will be returned.
Aliases: ls
## stack
Print stack trace.
......@@ -239,44 +232,49 @@ If -full is specified every stackframe will be decorated by the value of its loc
Aliases: bt
## frame
Executes command on a different frame.
## step
Single step through program.
frame <frame index> <command>.
Aliases: s
## step-instruction
Single step a single cpu instruction.
## source
Executes a file containing a list of delve commands
Aliases: si
source <path>
## thread
Switch to the specified thread.
thread <id>
## disassemble
Disassembler.
Aliases: tr
[goroutine <n>] [frame <m>] disassemble [-a <start> <end>] [-l <locspec>]
## threads
Print out info for every traced thread.
If no argument is specified the function being executed in the selected stack frame will be executed.
## trace
Set tracepoint.
trace [name] <linespec>
-a <start> <end> disassembles the specified address range
-l <locspec> disassembles the specified function
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: disass
See also: "help on", "help cond" and "help clear"
## on
Executes a command when a breakpoint is hit.
Aliases: t
on <breakpoint name or id> <command>.
Supported commands: print, stack and goroutine)
## types
Print list of types
types [<regex>]
## condition
Set breakpoint condition.
If regex is specified only the functions matching it will be returned.
condition <breakpoint name or id> <boolean expression>.
Specifies that the breakpoint or tracepoint should break only if the boolean expression is true.
Aliases: cond
## 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.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册