Fix compile error when debugger support is disabled.

This commit is contained in:
Stephen Anthony 2018-03-31 20:33:25 -02:30
parent b5afa69764
commit a978bb527e
4 changed files with 30 additions and 30 deletions

View File

@ -25,6 +25,7 @@
#include "StellaKeys.hxx" #include "StellaKeys.hxx"
#include "TIASurface.hxx" #include "TIASurface.hxx"
#include "PNGLibrary.hxx" #include "PNGLibrary.hxx"
#include "DialogContainer.hxx"
#include "PKeyboardHandler.hxx" #include "PKeyboardHandler.hxx"
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT

View File

@ -633,6 +633,7 @@ bool EventHandler::changeStateByEvent(Event::Type type)
break; break;
case Event::DebuggerMode: case Event::DebuggerMode:
#ifdef DEBUGGER_SUPPORT
if(myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE if(myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE
|| myState == EventHandlerState::TIMEMACHINE) || myState == EventHandlerState::TIMEMACHINE)
enterDebugMode(); enterDebugMode();
@ -640,6 +641,7 @@ bool EventHandler::changeStateByEvent(Event::Type type)
leaveDebugMode(); leaveDebugMode();
else else
handled = false; handled = false;
#endif
break; break;
default: default:

View File

@ -207,15 +207,6 @@ inline void M6502::handleHalt()
} }
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void M6502::updateStepStateByInstruction()
{
// Currently only used in debugger mode
#ifdef DEBUGGER_SUPPORT
myStepStateByInstruction = myCondBreaks.size() || myCondSaveStates.size() || myTrapConds.size();
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool M6502::execute(uInt32 number) bool M6502::execute(uInt32 number)
{ {
@ -237,21 +228,6 @@ bool M6502::execute(uInt32 number)
return status; return status;
} }
bool M6502::startDebugger(const string& message, int address, bool read) {
handleHalt();
mySystem->tia().updateEmulation();
mySystem->m6532().updateEmulation();
#ifndef DEBUGGER_SUPPORT
return false;
#endif
if (!myDebugger) return false;
return myDebugger->start(message, address, read);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
inline bool M6502::_execute(uInt32 number) inline bool M6502::_execute(uInt32 number)
{ {
@ -622,4 +598,23 @@ const StringList& M6502::getCondTrapNames() const
{ {
return myTrapCondNames; return myTrapCondNames;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void M6502::updateStepStateByInstruction()
{
myStepStateByInstruction = myCondBreaks.size() || myCondSaveStates.size() ||
myTrapConds.size();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool M6502::startDebugger(const string& message, int address, bool read)
{
handleHalt();
mySystem->tia().updateEmulation();
mySystem->m6532().updateEmulation();
return myDebugger->start(message, address, read);
}
#endif // DEBUGGER_SUPPORT #endif // DEBUGGER_SUPPORT

View File

@ -314,23 +314,25 @@ class M6502 : public Serializable
*/ */
void handleHalt(); void handleHalt();
/**
This is the actual dispatch function that does the grunt work. M6502::execute
wraps it and makes sure that any pending halt is processed before returning.
*/
bool _execute(uInt32 number);
#ifdef DEBUGGER_SUPPORT
/** /**
Check whether we are required to update hardware (TIA + RIOT) in lockstep Check whether we are required to update hardware (TIA + RIOT) in lockstep
with the CPU and update the flag accordingly. with the CPU and update the flag accordingly.
*/ */
void updateStepStateByInstruction(); void updateStepStateByInstruction();
/**
This is the actual dispatch function that does the grunt work. M6502::execute
wraps it and makes sure that any pending halt is processed before returning.
*/
bool _execute(uInt32 number);
/** /**
Make sure that the current hardware state is up to date (TIA & RIOT) and dispatch Make sure that the current hardware state is up to date (TIA & RIOT) and dispatch
debugger. debugger.
*/ */
bool startDebugger(const string& message = "", int address = -1, bool read = true); bool startDebugger(const string& message = "", int address = -1, bool read = true);
#endif // DEBUGGER_SUPPORT
private: private:
/** /**