--- hatari/tests/debugger/test-dummies.c 2019/04/09 08:49:07 1.1 +++ hatari/tests/debugger/test-dummies.c 2019/04/09 08:52:35 1.1.1.3 @@ -10,6 +10,11 @@ Uint64 LogTraceFlags = 0; #include "configuration.h" CNF_PARAMS ConfigureParams; +/* fake cycles stuff */ +#include "cycles.h" +int CurrentInstrCycles; +int Cycles_GetCounter(int nId) { return 0; } + /* fake ST RAM */ #include "stMemory.h" Uint8 STRam[16*1024*1024]; @@ -27,9 +32,10 @@ Uint32 IoAccessBaseAddress; /* fake CPU wrapper stuff */ #include "m68000.h" int nWaitStateCycles; +cpu_instruction_t CpuInstruction; void MakeFromSR(void) { } -/* fake AUE core registers */ +/* fake UAE core registers */ #include "newcpu.h" cpuop_func *cpufunctbl[65536]; struct regstruct regs; @@ -49,16 +55,57 @@ Uint32 TosAddress, TosSize; #include "debug_priv.h" #include "debugui.h" FILE *debugOutput; -void DebugUI(void) { } +void DebugUI(debug_reason_t reason) { } void DebugUI_PrintCmdHelp(const char *psCmd) { } /* fake debugInfo.c stuff */ #include "debugInfo.h" void DebugInfo_ShowSessionInfo(void) {} Uint32 DebugInfo_GetTEXT(void) { return 0x1234; } +Uint32 DebugInfo_GetTEXTEnd(void) { return 0x1234; } Uint32 DebugInfo_GetDATA(void) { return 0x12f4; } Uint32 DebugInfo_GetBSS(void) { return 0x1f34; } +/* fake debugdsp. stuff */ +#include "debugdsp.h" +void DebugDsp_InitSession(void) { } + +/* use fake dsp.c stuff in case config.h is configured with DSP emu */ +#include "dsp.h" +bool bDspEnabled; +Uint16 DSP_DisasmAddress(FILE *f, Uint16 lowerAdr, Uint16 UpperAdr) { return 0; } +Uint16 DSP_GetInstrCycles(void) { return 0; } +Uint16 DSP_GetPC(void) { return 0; } +int DSP_GetRegisterAddress(const char *arg, Uint32 **addr, Uint32 *mask) +{ + *addr = NULL; /* find if this gets used */ + *mask = 0; + return 0; +} +Uint32 DSP_ReadMemory(Uint16 addr, char space, const char **mem_str) +{ + *mem_str = NULL; /* find if this gets used */ + return 0; +} + +/* fake console redirection */ +#include "console.h" +int ConOutDevice; +void Console_Check(void) { } + +/* fake gemdos stuff */ +#include "gemdos.h" +const char *GemDOS_GetLastProgramPath(void) { return NULL; } + +/* fake profiler stuff */ +#include "profile.h" +const char Profile_Description[] = ""; +int Profile_Command(int nArgc, char *psArgs[], bool bForDsp) { return DEBUGGER_CMDDONE; } +char *Profile_Match(const char *text, int state) { return NULL; } +bool Profile_CpuStart(void) { return false; } +void Profile_CpuUpdate(void) { } +void Profile_CpuStop(void) { } + /* fake Hatari video variables */ #include "screen.h" #include "video.h" @@ -98,4 +145,8 @@ bool DebugUI_ParseFile(const char *path) /* fake disassembly output */ #include "68kDisass.h" -void Disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int cnt , int DisasmEngine) {} +Uint32 Disasm_GetNextPC(Uint32 pc) { return pc+2; } +void Disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int count) {} +void Disasm_GetColumns(int *columns) {} +void Disasm_SetColumns(int *columns) {} +void Disasm_DisableColumn(int column, int *oldcols, int *newcols) {}