fixes #244 (wrong source address display for cleared peeks)

This commit is contained in:
thrust26 2017-10-13 11:17:53 +02:00
parent 4050acad01
commit c6a5b96796
3 changed files with 19 additions and 12 deletions

View File

@ -120,6 +120,12 @@ void DiStella::disasm(uInt32 distart, int pass)
myPC = distart - myOffset;
while (myPC <= myAppData.end) {
// since -1 is used in m6502.m4 for clearing the last peek
// and this results into an access at e.g. 0xffff,
// we have to fix the consequences here (ugly!).
if(myPC == myAppData.end)
goto FIX_LAST;
if (checkBits(myPC, CartDebug::GFX | CartDebug::PGFX,
CartDebug::CODE)) {
if (pass == 2)
@ -137,6 +143,7 @@ void DiStella::disasm(uInt32 distart, int pass)
myPC++;
} else if (checkBits(myPC, CartDebug::ROW,
CartDebug::CODE | CartDebug::DATA | CartDebug::GFX | CartDebug::PGFX)) {
FIX_LAST:
if (pass == 2)
mark(myPC + myOffset, CartDebug::VALID_ENTRY);

View File

@ -38,7 +38,7 @@
#ifndef CLEAR_LAST_PEEK
#ifdef DEBUGGER_SUPPORT
#define CLEAR_LAST_PEEK(_addr) _addr = 0;
#define CLEAR_LAST_PEEK(_addr) _addr = -1;
#else
#define CLEAR_LAST_PEEK(_addr)
#endif

View File

@ -38,7 +38,7 @@
#ifndef CLEAR_LAST_PEEK
#ifdef DEBUGGER_SUPPORT
#define CLEAR_LAST_PEEK(_addr) _addr = 0;
#define CLEAR_LAST_PEEK(_addr) _addr = -1;
#else
#define CLEAR_LAST_PEEK(_addr)
#endif