mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 10:47:27 +08:00 
			
		
		
		
	* 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
					Alessandro Arzilli
				
			
				
					committed by
					
						 Derek Parker
						Derek Parker
					
				
			
			
				
	
			
			
			 Derek Parker
						Derek Parker
					
				
			
						parent
						
							311a53f80b
						
					
				
				
					commit
					a90893f532
				
			| @ -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 trace](dlv_trace.md)	 - Compile and begin tracing program. | ||||||
| * [dlv version](dlv_version.md)	 - Prints version. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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". | consider compiling debugging binaries with -gcflags="-N -l". | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
| dlv exec [./path/to/binary] | dlv exec <path/to/binary> | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| ### Options inherited from parent commands | ### Options inherited from parent commands | ||||||
| @ -38,4 +38,4 @@ dlv exec [./path/to/binary] | |||||||
| ### SEE ALSO | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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 | ### SEE ALSO | ||||||
| * [dlv](dlv.md)	 - Delve is a debugger for the Go programming language. | * [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`" | ` + "`dlv exec ./hello -- server --config conf/config.toml`" | ||||||
|  |  | ||||||
| // New returns an initialized command tree. | // New returns an initialized command tree. | ||||||
| func New() *cobra.Command { | func New(docCall bool) *cobra.Command { | ||||||
| 	// Config setup and load. | 	// Config setup and load. | ||||||
| 	conf = config.LoadConfig() | 	conf = config.LoadConfig() | ||||||
| 	buildFlagsDefault := "" | 	buildFlagsDefault := "" | ||||||
| @ -153,7 +153,7 @@ session.`, | |||||||
|  |  | ||||||
| 	// 'exec' subcommand. | 	// 'exec' subcommand. | ||||||
| 	execCommand := &cobra.Command{ | 	execCommand := &cobra.Command{ | ||||||
| 		Use:   "exec [./path/to/binary]", | 		Use:   "exec <path/to/binary>", | ||||||
| 		Short: "Execute a precompiled binary, and begin a debug session.", | 		Short: "Execute a precompiled binary, and begin a debug session.", | ||||||
| 		Long: `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) | 	RootCommand.AddCommand(versionCommand) | ||||||
|  |  | ||||||
| 	if path, _ := exec.LookPath("rr"); path != "" { | 	if path, _ := exec.LookPath("rr"); path != "" || docCall { | ||||||
| 		replayCommand := &cobra.Command{ | 		replayCommand := &cobra.Command{ | ||||||
| 			Use:   "replay [trace directory]", | 			Use:   "replay [trace directory]", | ||||||
| 			Short: "Replays a rr trace.", | 			Short: "Replays a rr trace.", | ||||||
|  | |||||||
| @ -10,5 +10,5 @@ var Build string | |||||||
|  |  | ||||||
| func main() { | func main() { | ||||||
| 	version.DelveVersion.Build = Build | 	version.DelveVersion.Build = Build | ||||||
| 	cmds.New().Execute() | 	cmds.New(false).Execute() | ||||||
| } | } | ||||||
|  | |||||||
| @ -8,5 +8,5 @@ import ( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| func main() { | func main() { | ||||||
| 	doc.GenMarkdownTree(cmds.New(), "./Documentation/usage") | 	doc.GenMarkdownTree(cmds.New(true), "./Documentation/usage") | ||||||
| } | } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user