From fa1db367febea6ebad09adb83f7deae26b6985d3 Mon Sep 17 00:00:00 2001 From: Nan Xiao Date: Mon, 30 May 2016 02:59:46 +0800 Subject: [PATCH] Docs: Update Documentation/cli/README.md. (#549) * Docs: Update Documentation/cli/README.md. --- Documentation/cli/README.md | 298 ++++++++++++++++++------------------ 1 file changed, 148 insertions(+), 150 deletions(-) diff --git a/Documentation/cli/README.md b/Documentation/cli/README.md index 6c9e1736..367bce00 100644 --- a/Documentation/cli/README.md +++ b/Documentation/cli/README.md @@ -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 ] [frame ] args [-v] [] + +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] - -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 -## step -Single step through program. -Aliases: s +## clearall +Deletes multiple breakpoints. -## step-instruction -Single step a single cpu instruction. + clearall [] + +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 . + +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 +## disassemble +Disassembler. -Aliases: tr + [goroutine ] [frame ] disassemble [-a ] [-l ] -## clear -Deletes breakpoint. +If no argument is specified the function being executed in the selected stack frame will be executed. + + -a disassembles the specified address range + -l disassembles the specified function - clear +Aliases: disass +## exit +Exit the debugger. -## clearall -Deletes multiple breakpoints. +Aliases: quit q - clearall [] - -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 . -## 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 [] - -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 ] [frame ] print + 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 ] [frame ] set = +## 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 [] + [goroutine ] [frame ] list [] -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 [] + [goroutine ] [frame ] locals [-v] [] -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 [] +Aliases: n -If regex is specified only the functions matching it will be returned. +## on +Executes a command when a breakpoint is hit. + on . + +Supported commands: print, stack and goroutine) -## args -Print function arguments. - [goroutine ] [frame ] args [-v] [] +## 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 ] [frame ] print +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 ] [frame ] locals [-v] [] +## 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] [] +## 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 ] [frame ] set = +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 -Aliases: quit q -## list -Show source code. +## sources +Print list of source files. - [goroutine ] [frame ] list [] + sources [] -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 . +Aliases: s +## step-instruction +Single step a single cpu instruction. -## source -Executes a file containing a list of delve commands +Aliases: si - source +## thread +Switch to the specified thread. + thread -## disassemble -Disassembler. +Aliases: tr - [goroutine ] [frame ] disassemble [-a ] [-l ] +## 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] - -a disassembles the specified address range - -l 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 . - -Supported commands: print, stack and goroutine) +## types +Print list of types + types [] -## condition -Set breakpoint condition. +If regex is specified only the functions matching it will be returned. - condition . - -Specifies that the breakpoint or tracepoint should break only if the boolean expression is true. -Aliases: cond +## vars +Print package variables. + + vars [-v] [] +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. -- GitLab