|
|
1.1 root 1: /*
2: * Dummy stuff needed to compile debugger related test code
3: */
4:
5: /* fake tracing flags */
6: #include "log.h"
7: Uint64 LogTraceFlags = 0;
8:
9: /* fake Hatari configuration variables for number parsing */
10: #include "configuration.h"
11: CNF_PARAMS ConfigureParams;
12:
1.1.1.3 ! root 13: /* fake cycles stuff */
! 14: #include "cycles.h"
! 15: int CurrentInstrCycles;
! 16: int Cycles_GetCounter(int nId) { return 0; }
! 17:
1.1 root 18: /* fake ST RAM */
19: #include "stMemory.h"
20: Uint8 STRam[16*1024*1024];
21: Uint32 STRamEnd = 4*1024*1024;
22:
23: /* fake memory banks */
24: #include "memory.h"
25: addrbank *mem_banks[65536];
26:
27: /* fake IO memory variables */
28: #include "ioMem.h"
29: int nIoMemAccessSize;
30: Uint32 IoAccessBaseAddress;
31:
32: /* fake CPU wrapper stuff */
33: #include "m68000.h"
34: int nWaitStateCycles;
1.1.1.3 ! root 35: cpu_instruction_t CpuInstruction;
1.1 root 36: void MakeFromSR(void) { }
37:
1.1.1.2 root 38: /* fake UAE core registers */
1.1 root 39: #include "newcpu.h"
40: cpuop_func *cpufunctbl[65536];
41: struct regstruct regs;
42: void MakeSR(void) { }
43: void m68k_dumpstate (FILE *f, uaecptr *nextpc) { }
44: void m68k_disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int cnt) { }
45:
46: /* fake memory snapshot */
47: #include "memorySnapShot.h"
48: void MemorySnapShot_Store(void *pData, int Size) { }
49:
50: /* fake TOS variables */
51: #include "tos.h"
52: Uint32 TosAddress, TosSize;
53:
54: /* fake debugui.c stuff */
55: #include "debug_priv.h"
56: #include "debugui.h"
57: FILE *debugOutput;
1.1.1.3 ! root 58: void DebugUI(debug_reason_t reason) { }
1.1 root 59: void DebugUI_PrintCmdHelp(const char *psCmd) { }
60:
61: /* fake debugInfo.c stuff */
62: #include "debugInfo.h"
63: void DebugInfo_ShowSessionInfo(void) {}
64: Uint32 DebugInfo_GetTEXT(void) { return 0x1234; }
1.1.1.3 ! root 65: Uint32 DebugInfo_GetTEXTEnd(void) { return 0x1234; }
1.1 root 66: Uint32 DebugInfo_GetDATA(void) { return 0x12f4; }
67: Uint32 DebugInfo_GetBSS(void) { return 0x1f34; }
68:
1.1.1.3 ! root 69: /* fake debugdsp. stuff */
! 70: #include "debugdsp.h"
! 71: void DebugDsp_InitSession(void) { }
! 72:
! 73: /* use fake dsp.c stuff in case config.h is configured with DSP emu */
! 74: #include "dsp.h"
! 75: bool bDspEnabled;
! 76: Uint16 DSP_DisasmAddress(FILE *f, Uint16 lowerAdr, Uint16 UpperAdr) { return 0; }
! 77: Uint16 DSP_GetInstrCycles(void) { return 0; }
! 78: Uint16 DSP_GetPC(void) { return 0; }
! 79: int DSP_GetRegisterAddress(const char *arg, Uint32 **addr, Uint32 *mask)
! 80: {
! 81: *addr = NULL; /* find if this gets used */
! 82: *mask = 0;
! 83: return 0;
! 84: }
! 85: Uint32 DSP_ReadMemory(Uint16 addr, char space, const char **mem_str)
! 86: {
! 87: *mem_str = NULL; /* find if this gets used */
! 88: return 0;
! 89: }
! 90:
! 91: /* fake console redirection */
! 92: #include "console.h"
! 93: int ConOutDevice;
! 94: void Console_Check(void) { }
! 95:
! 96: /* fake gemdos stuff */
! 97: #include "gemdos.h"
! 98: const char *GemDOS_GetLastProgramPath(void) { return NULL; }
! 99:
! 100: /* fake profiler stuff */
! 101: #include "profile.h"
! 102: const char Profile_Description[] = "";
! 103: int Profile_Command(int nArgc, char *psArgs[], bool bForDsp) { return DEBUGGER_CMDDONE; }
! 104: char *Profile_Match(const char *text, int state) { return NULL; }
! 105: bool Profile_CpuStart(void) { return false; }
! 106: void Profile_CpuUpdate(void) { }
! 107: void Profile_CpuStop(void) { }
! 108:
1.1 root 109: /* fake Hatari video variables */
110: #include "screen.h"
111: #include "video.h"
112: int nHBL = 20;
113: int nVBLs = 71;
114:
115: /* fake video variables accessor */
116: void Video_GetPosition(int *pFrameCycles, int *pHBL, int *pLineCycles)
117: {
118: *pFrameCycles = 2048;
119: *pHBL = nHBL;
120: *pFrameCycles = 508;
121: }
122:
123: /* only function needed from file.c */
124: #include <sys/stat.h>
125: #include <sys/time.h>
126: #include "file.h"
127: bool File_Exists(const char *filename)
128: {
129: struct stat buf;
130: if (stat(filename, &buf) == 0 &&
131: (buf.st_mode & (S_IRUSR|S_IWUSR)) && !(buf.st_mode & S_IFDIR))
132: {
133: /* file points to user readable regular file */
134: return true;
135: }
136: return false;
137: }
138:
139: /* fake debugger file parsing */
140: #include "debugui.h"
141: bool DebugUI_ParseFile(const char *path)
142: {
143: return File_Exists(path);
144: }
145:
146: /* fake disassembly output */
147: #include "68kDisass.h"
1.1.1.3 ! root 148: Uint32 Disasm_GetNextPC(Uint32 pc) { return pc+2; }
! 149: void Disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int count) {}
! 150: void Disasm_GetColumns(int *columns) {}
! 151: void Disasm_SetColumns(int *columns) {}
! 152: void Disasm_DisableColumn(int column, int *oldcols, int *newcols) {}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.