mirror of https://github.com/stella-emu/stella.git
Fix compile error when debugger support is disabled.
This commit is contained in:
parent
b5afa69764
commit
a978bb527e
|
@ -25,6 +25,7 @@
|
|||
#include "StellaKeys.hxx"
|
||||
#include "TIASurface.hxx"
|
||||
#include "PNGLibrary.hxx"
|
||||
#include "DialogContainer.hxx"
|
||||
#include "PKeyboardHandler.hxx"
|
||||
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
|
|
|
@ -633,6 +633,7 @@ bool EventHandler::changeStateByEvent(Event::Type type)
|
|||
break;
|
||||
|
||||
case Event::DebuggerMode:
|
||||
#ifdef DEBUGGER_SUPPORT
|
||||
if(myState == EventHandlerState::EMULATION || myState == EventHandlerState::PAUSE
|
||||
|| myState == EventHandlerState::TIMEMACHINE)
|
||||
enterDebugMode();
|
||||
|
@ -640,6 +641,7 @@ bool EventHandler::changeStateByEvent(Event::Type type)
|
|||
leaveDebugMode();
|
||||
else
|
||||
handled = false;
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
@ -237,21 +228,6 @@ bool M6502::execute(uInt32 number)
|
|||
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)
|
||||
{
|
||||
|
@ -622,4 +598,23 @@ const StringList& M6502::getCondTrapNames() const
|
|||
{
|
||||
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
|
||||
|
|
|
@ -314,23 +314,25 @@ class M6502 : public Serializable
|
|||
*/
|
||||
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
|
||||
with the CPU and update the flag accordingly.
|
||||
*/
|
||||
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
|
||||
debugger.
|
||||
*/
|
||||
bool startDebugger(const string& message = "", int address = -1, bool read = true);
|
||||
#endif // DEBUGGER_SUPPORT
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue