package dap import ( "bytes" "errors" "fmt" "sort" "strings" "github.com/go-delve/delve/pkg/config" "github.com/google/go-dap" ) func (s *Session) delveCmd(goid, frame int, cmdstr string) (string, error) { vals := strings.SplitN(strings.TrimSpace(cmdstr), " ", 2) cmdname := vals[0] var args string if len(vals) > 1 { args = strings.TrimSpace(vals[1]) } for _, cmd := range debugCommands(s) { for _, alias := range cmd.aliases { if alias == cmdname { return cmd.cmdFn(goid, frame, args) } } } return "", errNoCmd } type cmdfunc func(goid, frame int, args string) (string, error) type command struct { aliases []string helpMsg string cmdFn cmdfunc } const ( msgHelp = `Prints the help message. dlv help [command] Type "help" followed by the name of a command for more information about it.` msgConfig = `Changes configuration parameters. dlv config -list Show all configuration parameters. dlv config -list Show value of a configuration parameter. dlv config Changes the value of a configuration parameter. dlv config substitutePath dlv config substitutePath dlv config substitutePath -clear Adds or removes a path substitution rule. If -clear is used all substitutePath rules are removed. See also Documentation/cli/substitutepath.md. dlv config showPprofLabels