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
This commit is contained in:
Alessandro Arzilli
2017-06-20 19:36:07 +02:00
committed by Derek Parker
parent 311a53f80b
commit a90893f532
14 changed files with 17 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.",

View File

@ -10,5 +10,5 @@ var Build string
func main() {
version.DelveVersion.Build = Build
cmds.New().Execute()
cmds.New(false).Execute()
}

View File

@ -8,5 +8,5 @@ import (
)
func main() {
doc.GenMarkdownTree(cmds.New(), "./Documentation/usage")
doc.GenMarkdownTree(cmds.New(true), "./Documentation/usage")
}