mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 02:36:18 +08:00 
			
		
		
		
	Add command to print all goroutines info
This commit is contained in:
		| @ -24,15 +24,16 @@ type Commands struct { | ||||
| // Returns a Commands struct with default commands defined. | ||||
| func DebugCommands() *Commands { | ||||
| 	cmds := map[string]cmdfunc{ | ||||
| 		"help":     help, | ||||
| 		"continue": cont, | ||||
| 		"next":     next, | ||||
| 		"break":    breakpoint, | ||||
| 		"step":     step, | ||||
| 		"clear":    clear, | ||||
| 		"print":    printVar, | ||||
| 		"threads":  threads, | ||||
| 		"":         nullCommand, | ||||
| 		"help":       help, | ||||
| 		"continue":   cont, | ||||
| 		"next":       next, | ||||
| 		"break":      breakpoint, | ||||
| 		"step":       step, | ||||
| 		"clear":      clear, | ||||
| 		"print":      printVar, | ||||
| 		"threads":    threads, | ||||
| 		"goroutines": goroutines, | ||||
| 		"":           nullCommand, | ||||
| 	} | ||||
|  | ||||
| 	return &Commands{cmds} | ||||
| @ -89,6 +90,10 @@ func threads(p *proctl.DebuggedProcess, ars ...string) error { | ||||
| 	return p.PrintThreadInfo() | ||||
| } | ||||
|  | ||||
| func goroutines(p *proctl.DebuggedProcess, ars ...string) error { | ||||
| 	return p.PrintGoroutinesInfo() | ||||
| } | ||||
|  | ||||
| func cont(p *proctl.DebuggedProcess, ars ...string) error { | ||||
| 	err := p.Continue() | ||||
| 	if err != nil { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Derek Parker
					Derek Parker