Changes to get debugger classes to compile under Linux

This commit is contained in:
Nik Henson 2011-09-21 23:47:11 +00:00
parent 773c2ec9ad
commit eaa3bbf8b7
6 changed files with 18 additions and 24 deletions

View file

@ -107,9 +107,10 @@ ifeq ($(strip $(ENABLE_DEBUGGER)),yes)
OBJ += $(OBJ_DIR)/Debugger.o $(OBJ_DIR)/ConsoleDebugger.o $(OBJ_DIR)/SupermodelDebugger.o $(OBJ_DIR)/CPUDebug.o \ OBJ += $(OBJ_DIR)/Debugger.o $(OBJ_DIR)/ConsoleDebugger.o $(OBJ_DIR)/SupermodelDebugger.o $(OBJ_DIR)/CPUDebug.o \
$(OBJ_DIR)/AddressTable.o $(OBJ_DIR)/Breakpoint.o $(OBJ_DIR)/CodeAnalyser.o $(OBJ_DIR)/Exception.o \ $(OBJ_DIR)/AddressTable.o $(OBJ_DIR)/Breakpoint.o $(OBJ_DIR)/CodeAnalyser.o $(OBJ_DIR)/Exception.o \
$(OBJ_DIR)/Interrupt.o $(OBJ_DIR)/IO.o $(OBJ_DIR)/Label.o $(OBJ_DIR)/Register.o $(OBJ_DIR)/Watch.o \ $(OBJ_DIR)/Interrupt.o $(OBJ_DIR)/IO.o $(OBJ_DIR)/Label.o $(OBJ_DIR)/Register.o $(OBJ_DIR)/Watch.o \
$(OBJ_DIR)/PPCDebug.o $(OBJ_DIR)/PPCDebug.o $(OBJ_DIR)/68KDebug.o $(OBJ_DIR)/Musashi68KDebug.o $(OBJ_DIR)/Z80Debug.o
endif endif
# #
# Targets # Targets
# #

View file

@ -27,6 +27,7 @@
#include "AddressTable.h" #include "AddressTable.h"
#include <cstring>
#include <string> #include <string>
namespace Debugger namespace Debugger

View file

@ -42,7 +42,7 @@
namespace Debugger namespace Debugger
{ {
UINT32 GetSpecialReg(CCPUDebug *cpu, unsigned id) static UINT32 GetSpecialReg(CCPUDebug *cpu, unsigned id)
{ {
switch (id) switch (id)
{ {
@ -52,7 +52,7 @@ namespace Debugger
} }
} }
bool SetSpecialReg(CCPUDebug *cpu, unsigned id, UINT32 data) static bool SetSpecialReg(CCPUDebug *cpu, unsigned id, UINT32 data)
{ {
switch (id) switch (id)
{ {
@ -62,45 +62,45 @@ namespace Debugger
} }
} }
UINT8 GetCR(CCPUDebug *cpu, unsigned id) static UINT8 GetCR(CCPUDebug *cpu, unsigned id)
{ {
return ::ppc_get_cr(id); return ::ppc_get_cr(id);
} }
bool SetCR(CCPUDebug *cpu, unsigned id, UINT8 data) static bool SetCR(CCPUDebug *cpu, unsigned id, UINT8 data)
{ {
::ppc_set_cr(id, data); ::ppc_set_cr(id, data);
return true; return true;
} }
UINT32 GetSPR(CCPUDebug *cpu, unsigned id) static UINT32 GetSPR(CCPUDebug *cpu, unsigned id)
{ {
return ::ppc_read_spr(id); return ::ppc_read_spr(id);
} }
bool SetSPR(CCPUDebug *cpu, unsigned id, UINT32 data) static bool SetSPR(CCPUDebug *cpu, unsigned id, UINT32 data)
{ {
::ppc_write_spr(id, data); ::ppc_write_spr(id, data);
return true; return true;
} }
UINT32 GetGPR(CCPUDebug *cpu, unsigned id) static UINT32 GetGPR(CCPUDebug *cpu, unsigned id)
{ {
return ::ppc_get_gpr(id); return ::ppc_get_gpr(id);
} }
bool SetGPR(CCPUDebug *cpu, unsigned id, UINT32 data) static bool SetGPR(CCPUDebug *cpu, unsigned id, UINT32 data)
{ {
::ppc_set_gpr(id, data); ::ppc_set_gpr(id, data);
return true; return true;
} }
double GetFPR(CCPUDebug *cpu, unsigned id) static double GetFPR(CCPUDebug *cpu, unsigned id)
{ {
return ::ppc_get_fpr(id); return ::ppc_get_fpr(id);
} }
bool SetFPR(CCPUDebug *cpu, unsigned id, double data) static bool SetFPR(CCPUDebug *cpu, unsigned id, double data)
{ {
::ppc_set_fpr(id, data); ::ppc_set_fpr(id, data);
return true; return true;

View file

@ -36,15 +36,6 @@
namespace Debugger namespace Debugger
{ {
static UINT32 GetSpecialReg(CCPUDebug *cpu, unsigned id);
static bool SetSpecialReg(CCPUDebug *cpu, unsigned id, UINT32 data);
static UINT32 GetSPR(CCPUDebug *cpu, unsigned id);
static bool SetSPR(CCPUDebug *cpu, unsigned id, UINT32 data);
static UINT32 GetGPR(CCPUDebug *cpu, unsigned id);
static bool SetGPR(CCPUDebug *cpu, unsigned id, UINT32 data);
static double GetFPR(CCPUDebug *cpu, unsigned id);
static bool SetFRP(CCPUDebug *cpu, unsigned id, double data);
/* /*
* CCPUDebug implementation for the PowerPC PPC603 emulator. * CCPUDebug implementation for the PowerPC PPC603 emulator.
*/ */

View file

@ -35,11 +35,11 @@ using namespace std;
#include "Types.h" #include "Types.h"
#if defined(SUPERMODEL_WIN32) || defined(SUPERMODEL_UNIX) || defined(SUPERMODEL_OSX) //#if defined(SUPERMODEL_WIN32) || defined(SUPERMODEL_UNIX) || defined(SUPERMODEL_OSX)
#define DEBUGGER_HASBLOCKFILE #define DEBUGGER_HASBLOCKFILE
#define DEBUGGER_HASLOGGER #define DEBUGGER_HASLOGGER
#define DEBUGGER_HASTHREAD #define DEBUGGER_HASTHREAD
#endif //#endif
#define DEBUGGER_STATEFILE_VERSION 0 #define DEBUGGER_STATEFILE_VERSION 0
@ -51,11 +51,11 @@ using namespace std;
#ifndef SUPERMODEL_VERSION #ifndef SUPERMODEL_VERSION
#define SUPERMODEL_VERSION "" #define SUPERMODEL_VERSION ""
#endif // SUPERMODEL_VERSEION #endif // SUPERMODEL_VERSEION
#include "Logger.h" #include "OSD/Logger.h"
#endif // DEBUGGER_HASLOGGER #endif // DEBUGGER_HASLOGGER
#ifdef DEBUGGER_HASTHREAD #ifdef DEBUGGER_HASTHREAD
#include "Thread.h" #include "OSD/Thread.h"
#endif // DEBUGGER_HASTHREAD #endif // DEBUGGER_HASTHREAD
#ifndef stricmp #ifndef stricmp

View file

@ -459,6 +459,7 @@ void CDriveBoard::EmulateFrame(void)
UINT8 CDriveBoard::Read8(UINT32 addr) UINT8 CDriveBoard::Read8(UINT32 addr)
{ {
// TODO - shouldn't end of ROM be 0x7FFF not 0x8FFF?
if (addr < 0x9000) // ROM is 0x0000-0x8FFF if (addr < 0x9000) // ROM is 0x0000-0x8FFF
return m_rom[addr]; return m_rom[addr];
else if (addr >= 0xE000) // RAM is 0xE000-0xFFFF else if (addr >= 0xE000) // RAM is 0xE000-0xFFFF