Пример #1
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)
}
Пример #2
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)
}
Пример #3
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)
}
Пример #4
0
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)
}
Пример #5
0
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)
}
Пример #6
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)
}
Пример #7
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)
}
Пример #8
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)
}
Пример #9
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)
}
Пример #10
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)
}
Пример #11
0
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)
}
Пример #12
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)
}
Пример #13
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)
}
Пример #14
0
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
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)
}
Пример #16
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)
}
Пример #17
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)
}
Пример #18
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)
}