|
|
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) { }
1.1.1.4 ! root 60: char *DebugUI_MatchHelper(const char **strings, int items, const char *text, int state) {
! 61: return NULL;
! 62: }
1.1 root 63:
64: /* fake debugInfo.c stuff */
65: #include "debugInfo.h"
66: void DebugInfo_ShowSessionInfo(void) {}
67: Uint32 DebugInfo_GetTEXT(void) { return 0x1234; }
1.1.1.3 root 68: Uint32 DebugInfo_GetTEXTEnd(void) { return 0x1234; }
1.1 root 69: Uint32 DebugInfo_GetDATA(void) { return 0x12f4; }
70: Uint32 DebugInfo_GetBSS(void) { return 0x1f34; }
71:
1.1.1.4 ! root 72: /* fake debugdsp.c stuff */
1.1.1.3 root 73: #include "debugdsp.h"
74: void DebugDsp_InitSession(void) { }
1.1.1.4 ! root 75: Uint32 DebugDsp_InstrCount(void) { return 0; }
! 76: Uint32 DebugDsp_OpcodeType(void) { return 0; }
1.1.1.3 root 77:
78: /* use fake dsp.c stuff in case config.h is configured with DSP emu */
79: #include "dsp.h"
80: bool bDspEnabled;
81: Uint16 DSP_DisasmAddress(FILE *f, Uint16 lowerAdr, Uint16 UpperAdr) { return 0; }
82: Uint16 DSP_GetInstrCycles(void) { return 0; }
83: Uint16 DSP_GetPC(void) { return 0; }
84: int DSP_GetRegisterAddress(const char *arg, Uint32 **addr, Uint32 *mask)
85: {
86: *addr = NULL; /* find if this gets used */
87: *mask = 0;
88: return 0;
89: }
90: Uint32 DSP_ReadMemory(Uint16 addr, char space, const char **mem_str)
91: {
92: *mem_str = NULL; /* find if this gets used */
93: return 0;
94: }
95:
96: /* fake console redirection */
97: #include "console.h"
98: int ConOutDevice;
99: void Console_Check(void) { }
100:
101: /* fake gemdos stuff */
102: #include "gemdos.h"
103: const char *GemDOS_GetLastProgramPath(void) { return NULL; }
104:
105: /* fake profiler stuff */
106: #include "profile.h"
107: const char Profile_Description[] = "";
108: int Profile_Command(int nArgc, char *psArgs[], bool bForDsp) { return DEBUGGER_CMDDONE; }
109: char *Profile_Match(const char *text, int state) { return NULL; }
110: bool Profile_CpuStart(void) { return false; }
111: void Profile_CpuUpdate(void) { }
112: void Profile_CpuStop(void) { }
113:
1.1 root 114: /* fake Hatari video variables */
115: #include "screen.h"
116: #include "video.h"
117: int nHBL = 20;
118: int nVBLs = 71;
119:
120: /* fake video variables accessor */
121: void Video_GetPosition(int *pFrameCycles, int *pHBL, int *pLineCycles)
122: {
123: *pFrameCycles = 2048;
124: *pHBL = nHBL;
125: *pFrameCycles = 508;
126: }
127:
128: /* only function needed from file.c */
129: #include <sys/stat.h>
130: #include <sys/time.h>
131: #include "file.h"
132: bool File_Exists(const char *filename)
133: {
134: struct stat buf;
135: if (stat(filename, &buf) == 0 &&
136: (buf.st_mode & (S_IRUSR|S_IWUSR)) && !(buf.st_mode & S_IFDIR))
137: {
138: /* file points to user readable regular file */
139: return true;
140: }
141: return false;
142: }
143:
144: /* fake debugger file parsing */
145: #include "debugui.h"
1.1.1.4 ! root 146: bool DebugUI_ParseFile(const char *path, bool reinit)
1.1 root 147: {
148: return File_Exists(path);
149: }
150:
151: /* fake disassembly output */
152: #include "68kDisass.h"
1.1.1.3 root 153: Uint32 Disasm_GetNextPC(Uint32 pc) { return pc+2; }
154: void Disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int count) {}
155: void Disasm_GetColumns(int *columns) {}
156: void Disasm_SetColumns(int *columns) {}
157: 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.