Пример #1
0
/**
 * Readline match callback to list next command opcode types.
 * STATE = 0 -> different text from previous one.
 * Return next match or NULL if no matches.
 */
static char *DebugCpu_MatchNext(const char *text, int state)
{
	static const char* ntypes[] = {
		"branch", "exception", "exreturn", "return", "subcall", "subreturn"
	};
	return DebugUI_MatchHelper(ntypes, ARRAYSIZE(ntypes), text, state);
}
Пример #2
0
/**
 * Readline match callback to list profile subcommand names.
 * STATE = 0 -> different text from previous one.
 * Return next match or NULL if no matches.
 */
char *Profile_Match(const char *text, int state)
{
	static const char *names[] = {
		"addresses", "callers", "counts", "cycles", "loops", "misses",
		"off", "on", "save", "stack", "stats", "symbols"
	};
	return DebugUI_MatchHelper(names, ARRAYSIZE(names), text, state);
}
Пример #3
0
/**
 * Readline match callback to list register names usable within debugger.
 * STATE = 0 -> different text from previous one.
 * Return next match or NULL if no matches.
 */
static char *DebugCpu_MatchRegister(const char *text, int state)
{
	static const char* regs[] = {
		"a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
		"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
		"pc", "sr"
	};
	return DebugUI_MatchHelper(regs, ARRAYSIZE(regs), text, state);
}
Пример #4
0
/**
 * Command: Reset emulation
 */
static char *DebugUI_MatchReset(const char *text, int state)
{
	static const char* types[] = {	"cold", "hard", "soft", "warm" };
	return DebugUI_MatchHelper(types, ARRAYSIZE(types), text, state);
}