DS: Fix up modern debugger bits

This commit is contained in:
Vicki Pfau 2020-06-17 22:48:02 -07:00
parent d1903276fa
commit ea8c788e9d
2 changed files with 11 additions and 0 deletions

View File

@ -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;

View File

@ -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);