From 0af08634a81ccd596b4ab613cfdd1b4b86504c58 Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 22 Oct 2010 20:24:37 +0000 Subject: [PATCH] Addresses marked with certain directives within Distella should not propagate to the emulation core. That is, if something is determined to be CODE in Distella and *not* in the emulation core, then it shouldn't be marked as such. Note that the disassembly will still show it as CODE; it's just that the core will not. This fixes issues with manually specifying directives from the debugger prompt, whereby setting a directive and later turning it off never actually turns it off (as it was being permanently set). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2160 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/debugger/CartDebug.cxx | 5 ++++- src/debugger/DebuggerParser.cxx | 1 + src/debugger/DiStella.cxx | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index 1328b33db..89d56706b 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -1010,9 +1010,12 @@ void CartDebug::disasmTypeAsString(ostream& buf, DisasmType type) const case CartDebug::SKIP: buf << "SKIP"; break; case CartDebug::CODE: buf << "CODE"; break; case CartDebug::GFX: buf << "GFX"; break; + case CartDebug::PGFX: buf << "PGFX"; break; case CartDebug::DATA: buf << "DATA"; break; case CartDebug::ROW: buf << "ROW"; break; - default: break; + case CartDebug::REFERENCED: + case CartDebug::VALID_ENTRY: + case CartDebug::NONE: break; } } diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 4fbfd5d07..c3f9699fc 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -1017,6 +1017,7 @@ void DebuggerParser::executeHelp() if(len > clen) clen = len; } + commandResult << setfill(' '); for(int i = 0; i < kNumCommands; ++i) commandResult << setw(clen) << right << commands[i].cmdString << " - " << commands[i].description << endl; diff --git a/src/debugger/DiStella.cxx b/src/debugger/DiStella.cxx index cec707d65..e41228373 100644 --- a/src/debugger/DiStella.cxx +++ b/src/debugger/DiStella.cxx @@ -695,6 +695,7 @@ void DiStella::disasm(uInt32 distart, int pass) if (pass == 1) { + // RTS/JMP/RTI always indicate the end of a block of CODE if (!strcmp(ourLookup[op].mnemonic,"RTS") || !strcmp(ourLookup[op].mnemonic,"JMP") || /* !strcmp(ourLookup[op].mnemonic,"BRK") || */ @@ -779,7 +780,7 @@ int DiStella::mark(uInt32 address, uInt8 mask) if (address >= myOffset && address <= myAppData.end + myOffset) { - Debugger::debugger().setAddressDisasmType(address | myOffset, mask); +// Debugger::debugger().setAddressDisasmType(address | myOffset, mask); labels[address-myOffset] = labels[address-myOffset] | mask; return 1; } @@ -794,7 +795,7 @@ int DiStella::mark(uInt32 address, uInt8 mask) else if (address > 0x1000) { /* 2K & 4K case */ - Debugger::debugger().setAddressDisasmType(address | myOffset, mask); +// Debugger::debugger().setAddressDisasmType(address | myOffset, mask); labels[address & myAppData.end] = labels[address & myAppData.end] | mask; return 4; }