From ea8c788e9d8f31836c580d191d4ffae26b20f2ad Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 17 Jun 2020 22:48:02 -0700 Subject: [PATCH] DS: Fix up modern debugger bits --- src/ds/core.c | 8 ++++++++ src/ds/extra/cli.c | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/ds/core.c b/src/ds/core.c index 043e84221..05b14d296 100644 --- a/src/ds/core.c +++ b/src/ds/core.c @@ -81,6 +81,7 @@ static bool _DSCoreInit(struct mCore* core) { } core->cpu = arm9; core->board = ds; + core->timing = &ds->ds9.timing; core->debugger = NULL; dscore->arm7 = arm7; dscore->arm9 = arm9; @@ -617,6 +618,12 @@ static void _DSCoreLoadSymbols(struct mCore* core, struct VFile* vf) { } #endif } + +static bool _DSCoreLookupIdentifier(struct mCore* core, const char* name, int32_t* value, int* segment) { + UNUSED(core); + // TODO + return false; +} #endif static struct mCheatDevice* _DSCoreCheatDevice(struct mCore* core) { @@ -741,6 +748,7 @@ struct mCore* DSCoreCreate(void) { core->attachDebugger = _DSCoreAttachDebugger; core->detachDebugger = _DSCoreDetachDebugger; core->loadSymbols = _DSCoreLoadSymbols; + core->lookupIdentifier = _DSCoreLookupIdentifier; #endif core->cheatDevice = _DSCoreCheatDevice; core->savedataClone = _DSCoreSavedataClone; diff --git a/src/ds/extra/cli.c b/src/ds/extra/cli.c index a516a009f..f359c00ef 100644 --- a/src/ds/extra/cli.c +++ b/src/ds/extra/cli.c @@ -31,6 +31,7 @@ struct DSCLIDebugger* DSCLIDebuggerCreate(struct mCore* core) { debugger->d.name = "DS"; debugger->d.commands = _DSCLIDebuggerCommands; + debugger->d.commandAliases = NULL; debugger->core = core; @@ -63,8 +64,10 @@ static void _switchCpu(struct CLIDebugger* debugger, struct CLIDebugVector* dv) debugger->d.platform->deinit(debugger->d.platform); if (core->cpu == ds->ds9.cpu) { core->cpu = ds->ds7.cpu; + core->timing = &ds->ds7.timing; } else { core->cpu = ds->ds9.cpu; + core->timing = &ds->ds9.timing; } debugger->d.platform->init(core->cpu, debugger->d.platform); debugger->system->printStatus(debugger->system);