示例#1
0
func init() {
	name := "enable"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: EnableCommand,
		Help: `enable [bpnum1 ...]

Enable a breakpoint by the number assigned to it.`,

		Min_args: 0,
		Max_args: -1,
	}
	gub.AddToCategory("breakpoints", name)
}
示例#2
0
文件: jump.go 项目: rocky/ssa-interp
func init() {
	name := "jump"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: JumpCommand,
		Help: `jump *num*

Jumps to instruction *num* inside the current basic block.
`,
		Min_args: 1,
		Max_args: 1,
	}
	gub.AddToCategory("running", name)
}
示例#3
0
func init() {
	name := "whatis"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: WhatisCommand,
		Help: `whatis *name*

print information about *name* which can include a dotted variable name.
`,
		Min_args: 1,
		Max_args: 1,
	}
	gub.AddToCategory("inspecting", name)
}
示例#4
0
func init() {
	name := "disable"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: DisableCommand,
		Help: `Disable [bpnum1 ...]

Disable a breakpoint by its breakpoint number.

See also "enable", "delete", and "info break"`,
		Min_args: 0,
		Max_args: -1,
	}
	gub.AddToCategory("breakpoints", name)
}
示例#5
0
func init() {
	name := "delete"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: DeleteCommand,
		Help: `Delete [bpnum1 ...]

Delete a breakpoint by breakpoint number.
`,

		Min_args: 0,
		Max_args: -1,
	}
	gub.AddToCategory("breakpoints", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("del", name)
}
示例#6
0
func init() {
	name := "continue"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: ContinueCommand,
		Help: `continue

Leave the debugger loop and continue execution. Subsequent entry to
the debugger however may occur via breakpoints or explicit calls, or
exceptions.
`,
		Min_args: 0,
		Max_args: 0,
	}
	gub.AddAlias("c", name)
	gub.AddToCategory("running", name)
}
示例#7
0
文件: down.go 项目: rocky/ssa-interp
func init() {
	name := "down"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: DownCommand,
		Help: `down [*count*]

Move the current frame down in the stack trace (to a newer frame). 0
is the most recent frame. If no count is given, move down 1.

See also 'up' and 'frame'.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("stack", name)
}
示例#8
0
文件: stepi.go 项目: rocky/ssa-interp
func init() {
	name := "stepi"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: StepInstructionCommand,
		Help: `stepi

Execute one SSA instrcution and stop.

See also step, and next.
`,
		Min_args: 0,
		Max_args: 0,
	}
	gub.AddToCategory("running", name)
	// Down the line we'll have abbrevs
}
示例#9
0
文件: up.go 项目: rocky/ssa-interp
func init() {
	name := "up"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: UpCommand,
		Help: `up [*count*]

Move the current frame up in the stack trace (to a older frame). 0
is the most-recent frame. If no count is given, move down 1.

See also 'down' and 'frame'.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("stack", name)
}
示例#10
0
文件: set.go 项目: rocky/ssa-interp
func init() {
	name := "set"
	gub.Cmds[name] = &gub.CmdInfo{
		SubcmdMgr: &gub.SubcmdMgr{
			Name:    name,
			Subcmds: make(gub.SubcmdMap),
		},
		Fn: SetCommand,
		Help: `Modifies parts of the debugger environment.

Type "set" for a list of "set" subcommands and what they do.`,
		Min_args: 0,
		Max_args: 3,
	}
	gub.AddToCategory("support", name)
}
示例#11
0
func init() {
	name := "environment"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: EnvironmentCommand,
		Help: `environment [*name*]

print current runtime environment values.
If *name* is supplied, only show that name.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("inspecting", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("env", name)
	gub.AddAlias("environ", name)
}
示例#12
0
func init() {
	name := "locations"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: LocationsCommand,
		Help: `locations

Give list of all the stopping locations in the package
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("status", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("locs", name)
	gub.AddAlias("loc", name)
	gub.AddAlias("location", name)
}
示例#13
0
文件: run.go 项目: rocky/ssa-interp
func init() {
	name := "run"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: RunCommand,
		Help: `run

Terminates program. If an exit code is given, that is the exit code
for the program. Zero (normal termination) is used if no
termintation code.
`,
		Min_args: 0,
		Max_args: 0,
	}
	gub.AddToCategory("running", name)
	gub.AddAlias("R", name)
	gub.AddAlias("restart", name)
}
示例#14
0
文件: next.go 项目: rocky/ssa-interp
func init() {
	name := "next"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: NextCommand,
		Help: `next

Step one statement ignoring steps into function calls at this level.

Sometimes this is called 'step over'.
`,
		Min_args: 0,
		Max_args: 0,
	}
	gub.AddToCategory("running", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("n", name)
}
示例#15
0
文件: show.go 项目: rocky/ssa-interp
func init() {
	name := "show"
	gub.Cmds[name] = &gub.CmdInfo{
		SubcmdMgr: &gub.SubcmdMgr{
			Name:    name,
			Subcmds: make(gub.SubcmdMap),
		},
		Fn: ShowCommand,
		Help: `Generic command for showing things about the debugger.

Type "set" for a list of "set" subcommands and what they do.
Type "help set *" for just a list of "info" subcommands.`,
		Min_args: 0,
		Max_args: 3,
	}
	gub.AddToCategory("support", name)
}
示例#16
0
func init() {
	name := "instruction"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: InstructionCommand,
		Help: `instruction [num [operand]]

Print information about instruction
`,
		Min_args: 0,
		Max_args: 2,
	}
	gub.AddToCategory("inspecting", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("inst", name)
	gub.AddAlias("instr", name)
	gub.AddAlias("instruct", name)
}
示例#17
0
文件: show.go 项目: rocky/ssa-interp
func init() {
	name := "show"
	gub.Cmds[name] = &gub.CmdInfo{
		SubcmdMgr: &gub.SubcmdMgr{
			Name:    name,
			Subcmds: make(gub.SubcmdMap),
		},
		Fn: ShowCommand,
		Help: `Show parts of the debugger environment.

Type "show" for a list of "show" subcommands and what they do.
Type "help show *" for just a list of "show" subcommands.`,
		Min_args: 0,
		Max_args: 3,
	}
	gub.AddToCategory("support", name)
}
示例#18
0
文件: quit.go 项目: rocky/ssa-interp
func init() {
	name := "quit"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: QuitCommand,
		Help: `quit [exit-code]

Terminates program. If an exit code is given, that is the exit code
for the program. Zero (normal termination) is used if no
termintation code.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("support", name)
	gub.AddAlias("exit", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("q", name)
}
示例#19
0
func init() {
	name := "disassemble"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: DisassembleCommand,
		Help: `disassemble [*fn* | *int* | . | + ]

disassemble SSA instructions. Without any parameters we disassemble the
current instruction. If a function name is given, that is disassembled.
If a number is given that is the block number of the current frame.
If "." is given we disassemble the current block only. If "+" we disassemble
the current function.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("inspecting", name)
	gub.AddAlias("disasm", name)
}
示例#20
0
文件: step.go 项目: rocky/ssa-interp
func init() {
	name := "step"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: StepCommand,
		Help: `step

Execute the current statement, stopping at the next event.  Sometimes this
is called 'step into'.

See also: stepi, continue, finish, and next.
`,
		Min_args: 0,
		Max_args: 0,
	}
	gub.AddToCategory("running", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("s", name)
}
示例#21
0
func init() {
	name := "goroutines"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: GoroutinesCommand,
		Help: `goroutines [*id*]

Without a parameter, list stack traces for each active goroutine. If an id
is given only that goroutine stack trace is shown. The main (first) goroutine is 0.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("stack", name)
	gub.AddAlias("gore", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("gor", name)
	gub.AddAlias("goroutine", name)
}
示例#22
0
文件: info.go 项目: rocky/ssa-interp
func init() {
	name := "info"
	gub.Cmds[name] = &gub.CmdInfo{
		SubcmdMgr: &gub.SubcmdMgr{
			Name:    name,
			Subcmds: make(gub.SubcmdMap),
		},
		Fn: InfoCommand,
		Help: `Generic command for showing things about the program being debugged.

Type "info" for a list of "info" subcommands and what they do.
Type "help info *" for just a list of "info" subcommands.
`,
		Min_args: 0,
		Max_args: -1,
	}
	gub.AddToCategory("status", name)
}
示例#23
0
func init() {
	name := "aliases"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: AliasCommand,
		Help: `aliases

Without argument, print the list of debugger command aliases.

When an argument is given, if it is command name, the aliases for
that command are shown. if the argument is an alias name, we'll
show the command that this is an alias for.
`,

		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("support", name)
	gub.AddAlias("alias", name)
}
示例#24
0
func init() {
	name := "globals"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: GlobalsCommand,
		Help: `globals [*name*]

show global variable information. If *name* is not given list
all global variables.

See also "locals", "whatis", and "eval".
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("inspecting", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("global", name)
	gub.AddAlias("gl", name)
}
示例#25
0
func init() {
	name := "backtrace"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: BacktraceCommand,
		Help: `backtrace [*count*]

Print a stack trace, with the most recent frame at the top.

With a positive number, print at most many entries.`,

		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("stack", name)
	gub.AddAlias("where", name)
	gub.AddAlias("T", name) // for perl5db hackers
	// Down the line we'll have abbrevs
	gub.AddAlias("bt", name)
}
示例#26
0
func init() {
	name := "finish"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: FinishCommand,
		Help: `finish

Continue execution until the program is about to:

* leave the current function, or
* switch context via yielding back or finishing a block which was
  yielded to.

Sometimes this is called 'step out'.
`,
		Min_args: 0,
		Max_args: 0,
	}
	gub.AddToCategory("running", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("fin", name)
}
示例#27
0
func init() {
	name := "breakpoint"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: BreakpointCommand,
		Help: `breakpoint [*fn* | line [column]]

Set a breakpoint. The target can either be a function name as fn pkg.fn
or a line and and optional column number. Specifying a column number
may be useful if there is more than one statement on a line or if you
want to distinguish parts of a compound statement.

See also "info break", "enable", and "disable".
`,

		Min_args: 0,
		Max_args: 2,
	}
	gub.AddToCategory("breakpoints", name)
	gub.AddAlias("break", name)
	gub.AddAlias("b", name)
}
示例#28
0
文件: ast.go 项目: rocky/ssa-interp
func init() {
	name := "ast"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: AstCommand,
		Help: `ast [function]


Prints formatted source code from the AST. If a function is given, the
source for function is printed. If no function is given, we give the
source code for the high level statement that we are stopped at. Ths
could be for example an assignemnt statement, a for loop, a condition
in a for loop, or initializer in a for loop, to name just a few
examples.

See also the "format" command.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("files", name)
}
示例#29
0
func init() {
	name := "format"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: FormatCommand,
		Help: `format [function | .]

Prints formatted source code from the AST. If a function is given, the
source for function is printed. If '." is given we use the current
function. Otherwise, we give the source code for the high level
statement that we are stopped at. This could be for example an
assignment statement, a for loop, a condition in a for loop, or
initializer in a for loop, to name just a few examples.

See also the "ast" command.
`,
		Min_args: 0,
		Max_args: 1,
	}
	gub.AddToCategory("files", name)
	gub.AddAlias("list", name)
	gub.AddAlias("l", name)
}
示例#30
0
文件: help.go 项目: rocky/ssa-interp
func init() {
	name := "help"
	gub.Cmds[name] = &gub.CmdInfo{
		Fn: HelpCommand,
		Help: `help [*command* | *category* | categories | * ]

Without argument, print the list of available debugger commands.

When an argument is given, if it is '*' a list of debugger commands
is shown. Otherwise the argument is checked to see if it is command
name. For example 'help up' gives help on the 'up' debugger command.

If a category name is given, a list of commands in that category is
shown. For a list of categories, enter "help categories".
`,

		Min_args: 0,
		Max_args: 2,
	}
	gub.AddToCategory("support", name)
	gub.AddAlias("?", name)
	// Down the line we'll have abbrevs
	gub.AddAlias("h", name)
}