all repos — mgba @ 56d83bee11a478605a2d8d761975ae74348e8328

mGBA Game Boy Advance Emulator

Debugger: Fix build on MINIMAL_CORE=2
Vicki Pfau vi@endrift.com
Sat, 01 Feb 2020 15:36:29 -0800
commit

56d83bee11a478605a2d8d761975ae74348e8328

parent

fb652f411a62fd7655380c6fe2a0cf26fe98719d

2 files changed, 12 insertions(+), 0 deletions(-)

jump to
M src/gb/debugger/cli.csrc/gb/debugger/cli.c

@@ -16,13 +16,17 @@ static void _GBCLIDebuggerInit(struct CLIDebuggerSystem*);

static bool _GBCLIDebuggerCustom(struct CLIDebuggerSystem*); static void _frame(struct CLIDebugger*, struct CLIDebugVector*); +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 static void _load(struct CLIDebugger*, struct CLIDebugVector*); static void _save(struct CLIDebugger*, struct CLIDebugVector*); +#endif struct CLIDebuggerCommandSummary _GBCLIDebuggerCommands[] = { { "frame", _frame, "", "Frame advance" }, +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 { "load", _load, "*", "Load a savestate" }, { "save", _save, "*", "Save a savestate" }, +#endif { 0, 0, 0, 0 } };

@@ -73,6 +77,7 @@ gbDebugger->frameAdvance = true;

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) { struct CLIDebuggerBackend* be = debugger->backend; if (!dv || dv->type != CLIDV_INT_TYPE) {

@@ -106,3 +111,4 @@ struct GBCLIDebugger* gbDebugger = (struct GBCLIDebugger*) debugger->system;

mCoreSaveState(gbDebugger->core, dv->intValue, SAVESTATE_SCREENSHOT | SAVESTATE_RTC | SAVESTATE_METADATA); } +#endif
M src/gba/debugger/cli.csrc/gba/debugger/cli.c

@@ -16,13 +16,17 @@ static void _GBACLIDebuggerInit(struct CLIDebuggerSystem*);

static bool _GBACLIDebuggerCustom(struct CLIDebuggerSystem*); static void _frame(struct CLIDebugger*, struct CLIDebugVector*); +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 static void _load(struct CLIDebugger*, struct CLIDebugVector*); static void _save(struct CLIDebugger*, struct CLIDebugVector*); +#endif struct CLIDebuggerCommandSummary _GBACLIDebuggerCommands[] = { { "frame", _frame, "", "Frame advance" }, +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 { "load", _load, "*", "Load a savestate" }, { "save", _save, "*", "Save a savestate" }, +#endif { 0, 0, 0, 0 } };

@@ -72,6 +76,7 @@ gbaDebugger->frameAdvance = true;

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) { struct CLIDebuggerBackend* be = debugger->backend; if (!dv || dv->type != CLIDV_INT_TYPE) {

@@ -107,3 +112,4 @@ struct GBACLIDebugger* gbaDebugger = (struct GBACLIDebugger*) debugger->system;

mCoreSaveState(gbaDebugger->core, dv->intValue, SAVESTATE_SCREENSHOT | SAVESTATE_RTC | SAVESTATE_METADATA); } +#endif