mirror of https://github.com/mgba-emu/mgba.git
Debugger: Fix build on MINIMAL_CORE=2
This commit is contained in:
parent
fb652f411a
commit
56d83bee11
|
@ -16,13 +16,17 @@ static void _GBCLIDebuggerInit(struct CLIDebuggerSystem*);
|
||||||
static bool _GBCLIDebuggerCustom(struct CLIDebuggerSystem*);
|
static bool _GBCLIDebuggerCustom(struct CLIDebuggerSystem*);
|
||||||
|
|
||||||
static void _frame(struct CLIDebugger*, struct CLIDebugVector*);
|
static void _frame(struct CLIDebugger*, struct CLIDebugVector*);
|
||||||
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
static void _load(struct CLIDebugger*, struct CLIDebugVector*);
|
static void _load(struct CLIDebugger*, struct CLIDebugVector*);
|
||||||
static void _save(struct CLIDebugger*, struct CLIDebugVector*);
|
static void _save(struct CLIDebugger*, struct CLIDebugVector*);
|
||||||
|
#endif
|
||||||
|
|
||||||
struct CLIDebuggerCommandSummary _GBCLIDebuggerCommands[] = {
|
struct CLIDebuggerCommandSummary _GBCLIDebuggerCommands[] = {
|
||||||
{ "frame", _frame, "", "Frame advance" },
|
{ "frame", _frame, "", "Frame advance" },
|
||||||
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
{ "load", _load, "*", "Load a savestate" },
|
{ "load", _load, "*", "Load a savestate" },
|
||||||
{ "save", _save, "*", "Save a savestate" },
|
{ "save", _save, "*", "Save a savestate" },
|
||||||
|
#endif
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,6 +77,7 @@ static void _frame(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
||||||
gbDebugger->inVblank = GBRegisterSTATGetMode(((struct GB*) gbDebugger->core->board)->memory.io[REG_STAT]) == 1;
|
gbDebugger->inVblank = GBRegisterSTATGetMode(((struct GB*) gbDebugger->core->board)->memory.io[REG_STAT]) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
static void _load(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
static void _load(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
||||||
struct CLIDebuggerBackend* be = debugger->backend;
|
struct CLIDebuggerBackend* be = debugger->backend;
|
||||||
if (!dv || dv->type != CLIDV_INT_TYPE) {
|
if (!dv || dv->type != CLIDV_INT_TYPE) {
|
||||||
|
@ -106,3 +111,4 @@ static void _save(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
||||||
|
|
||||||
mCoreSaveState(gbDebugger->core, dv->intValue, SAVESTATE_SCREENSHOT | SAVESTATE_RTC | SAVESTATE_METADATA);
|
mCoreSaveState(gbDebugger->core, dv->intValue, SAVESTATE_SCREENSHOT | SAVESTATE_RTC | SAVESTATE_METADATA);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -16,13 +16,17 @@ static void _GBACLIDebuggerInit(struct CLIDebuggerSystem*);
|
||||||
static bool _GBACLIDebuggerCustom(struct CLIDebuggerSystem*);
|
static bool _GBACLIDebuggerCustom(struct CLIDebuggerSystem*);
|
||||||
|
|
||||||
static void _frame(struct CLIDebugger*, struct CLIDebugVector*);
|
static void _frame(struct CLIDebugger*, struct CLIDebugVector*);
|
||||||
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
static void _load(struct CLIDebugger*, struct CLIDebugVector*);
|
static void _load(struct CLIDebugger*, struct CLIDebugVector*);
|
||||||
static void _save(struct CLIDebugger*, struct CLIDebugVector*);
|
static void _save(struct CLIDebugger*, struct CLIDebugVector*);
|
||||||
|
#endif
|
||||||
|
|
||||||
struct CLIDebuggerCommandSummary _GBACLIDebuggerCommands[] = {
|
struct CLIDebuggerCommandSummary _GBACLIDebuggerCommands[] = {
|
||||||
{ "frame", _frame, "", "Frame advance" },
|
{ "frame", _frame, "", "Frame advance" },
|
||||||
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
{ "load", _load, "*", "Load a savestate" },
|
{ "load", _load, "*", "Load a savestate" },
|
||||||
{ "save", _save, "*", "Save a savestate" },
|
{ "save", _save, "*", "Save a savestate" },
|
||||||
|
#endif
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,6 +76,7 @@ static void _frame(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
||||||
gbaDebugger->inVblank = GBARegisterDISPSTATGetInVblank(((struct GBA*) gbaDebugger->core->board)->memory.io[REG_DISPSTAT >> 1]);
|
gbaDebugger->inVblank = GBARegisterDISPSTATGetInVblank(((struct GBA*) gbaDebugger->core->board)->memory.io[REG_DISPSTAT >> 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
|
||||||
static void _load(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
static void _load(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
||||||
struct CLIDebuggerBackend* be = debugger->backend;
|
struct CLIDebuggerBackend* be = debugger->backend;
|
||||||
if (!dv || dv->type != CLIDV_INT_TYPE) {
|
if (!dv || dv->type != CLIDV_INT_TYPE) {
|
||||||
|
@ -107,3 +112,4 @@ static void _save(struct CLIDebugger* debugger, struct CLIDebugVector* dv) {
|
||||||
|
|
||||||
mCoreSaveState(gbaDebugger->core, dv->intValue, SAVESTATE_SCREENSHOT | SAVESTATE_RTC | SAVESTATE_METADATA);
|
mCoreSaveState(gbaDebugger->core, dv->intValue, SAVESTATE_SCREENSHOT | SAVESTATE_RTC | SAVESTATE_METADATA);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue