當前位置: 首頁>>代碼示例>>Golang>>正文


Golang gub.AddToCategory函數代碼示例

本文整理匯總了Golang中github.com/rocky/ssa-interp/gub.AddToCategory函數的典型用法代碼示例。如果您正苦於以下問題:Golang AddToCategory函數的具體用法?Golang AddToCategory怎麽用?Golang AddToCategory使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AddToCategory函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:13,代碼來源:enable.go

示例2: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:13,代碼來源:jump.go

示例3: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:13,代碼來源:whatis.go

示例4: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:14,代碼來源:disable.go

示例5: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:16,代碼來源:delete.go

示例6: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:16,代碼來源:continue.go

示例7: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:16,代碼來源:down.go

示例8: init

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
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:16,代碼來源:stepi.go

示例9: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:16,代碼來源:up.go

示例10: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:16,代碼來源:set.go

示例11: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:17,代碼來源:environment.go

示例12: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:17,代碼來源:locations.go

示例13: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:17,代碼來源:run.go

示例14: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:17,代碼來源:next.go

示例15: init

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)
}
開發者ID:rocky,項目名稱:ssa-interp,代碼行數:17,代碼來源:show.go


注:本文中的github.com/rocky/ssa-interp/gub.AddToCategory函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。