提交 a90893f5 编写于 作者: A Alessandro Arzilli 提交者: Derek Parker

path/to/binary is the required argument (#847 fixed) (#884)

* cmd: include replay command in docs even if rr is not installed.

* path/to/binary is the required argument

Replaces #847
上级 311a53f8
......@@ -47,4 +47,4 @@ Pass flags to the program you are debugging using `--`, for example:
* [dlv trace](dlv_trace.md) - Compile and begin tracing program.
* [dlv version](dlv_version.md) - Prints version.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -38,4 +38,4 @@ dlv attach pid [executable]
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -33,4 +33,4 @@ dlv connect addr
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -37,4 +37,4 @@ dlv core <executable> <core>
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -38,4 +38,4 @@ dlv debug [package]
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -13,7 +13,7 @@ optimizations disabled, it may be difficult to properly debug it. Please
consider compiling debugging binaries with -gcflags="-N -l".
```
dlv exec [./path/to/binary]
dlv exec <path/to/binary>
```
### Options inherited from parent commands
......@@ -38,4 +38,4 @@ dlv exec [./path/to/binary]
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -37,4 +37,4 @@ dlv replay [trace directory]
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -33,4 +33,4 @@ dlv run
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -38,4 +38,4 @@ dlv test [package]
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -45,4 +45,4 @@ dlv trace [package] regexp
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -33,4 +33,4 @@ dlv version
### SEE ALSO
* [dlv](dlv.md) - Delve is a debugger for the Go programming language.
###### Auto generated by spf13/cobra on 5-May-2017
###### Auto generated by spf13/cobra on 20-Jun-2017
......@@ -71,7 +71,7 @@ Pass flags to the program you are debugging using ` + "`--`" + `, for example:
` + "`dlv exec ./hello -- server --config conf/config.toml`"
// New returns an initialized command tree.
func New() *cobra.Command {
func New(docCall bool) *cobra.Command {
// Config setup and load.
conf = config.LoadConfig()
buildFlagsDefault := ""
......@@ -153,7 +153,7 @@ session.`,
// 'exec' subcommand.
execCommand := &cobra.Command{
Use: "exec [./path/to/binary]",
Use: "exec <path/to/binary>",
Short: "Execute a precompiled binary, and begin a debug session.",
Long: `Execute a precompiled binary and begin a debug session.
......@@ -242,7 +242,7 @@ core dump was taken.`,
}
RootCommand.AddCommand(versionCommand)
if path, _ := exec.LookPath("rr"); path != "" {
if path, _ := exec.LookPath("rr"); path != "" || docCall {
replayCommand := &cobra.Command{
Use: "replay [trace directory]",
Short: "Replays a rr trace.",
......
......@@ -10,5 +10,5 @@ var Build string
func main() {
version.DelveVersion.Build = Build
cmds.New().Execute()
cmds.New(false).Execute()
}
......@@ -8,5 +8,5 @@ import (
)
func main() {
doc.GenMarkdownTree(cmds.New(), "./Documentation/usage")
doc.GenMarkdownTree(cmds.New(true), "./Documentation/usage")
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册