trace: Fix panic calling trace without arg

This commit is contained in:
Derek Parker 2016-01-31 11:14:58 +01:00
parent 3a8730de72
commit 975a114c0f

@ -144,6 +144,10 @@ starts and attaches to it, and enables you to immediately begin debugging your p
Long: "Trace program execution. Will set a tracepoint on every function matching [regexp] and output information when tracepoint is hit.",
Run: func(cmd *cobra.Command, args []string) {
status := func() int {
if len(args) == 0 {
fmt.Fprintln(os.Stderr, "You must provide a function to trace.")
return 1
}
const debugname = "debug"
var processArgs []string
if traceAttachPid == 0 {