Annotation of hatari/tests/debugger/test-dummies.c, revision 1.1

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: 
        !            13: /* fake ST RAM */
        !            14: #include "stMemory.h"
        !            15: Uint8 STRam[16*1024*1024];
        !            16: Uint32 STRamEnd = 4*1024*1024;
        !            17: 
        !            18: /* fake memory banks */
        !            19: #include "memory.h"
        !            20: addrbank *mem_banks[65536];
        !            21: 
        !            22: /* fake IO memory variables */
        !            23: #include "ioMem.h"
        !            24: int nIoMemAccessSize;
        !            25: Uint32 IoAccessBaseAddress;
        !            26: 
        !            27: /* fake CPU wrapper stuff */
        !            28: #include "m68000.h"
        !            29: int nWaitStateCycles;
        !            30: void MakeFromSR(void) { }
        !            31: 
        !            32: /* fake AUE core registers */
        !            33: #include "newcpu.h"
        !            34: cpuop_func *cpufunctbl[65536];
        !            35: struct regstruct regs;
        !            36: void MakeSR(void) { }
        !            37: void m68k_dumpstate (FILE *f, uaecptr *nextpc) { }
        !            38: void m68k_disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int cnt) { }
        !            39: 
        !            40: /* fake memory snapshot */
        !            41: #include "memorySnapShot.h"
        !            42: void MemorySnapShot_Store(void *pData, int Size) { }
        !            43: 
        !            44: /* fake TOS variables */
        !            45: #include "tos.h"
        !            46: Uint32 TosAddress, TosSize;
        !            47: 
        !            48: /* fake debugui.c stuff */
        !            49: #include "debug_priv.h"
        !            50: #include "debugui.h"
        !            51: FILE *debugOutput;
        !            52: void DebugUI(void) { }
        !            53: void DebugUI_PrintCmdHelp(const char *psCmd) { }
        !            54: 
        !            55: /* fake debugInfo.c stuff */
        !            56: #include "debugInfo.h"
        !            57: void DebugInfo_ShowSessionInfo(void) {}
        !            58: Uint32 DebugInfo_GetTEXT(void) { return 0x1234; }
        !            59: Uint32 DebugInfo_GetDATA(void) { return 0x12f4; }
        !            60: Uint32 DebugInfo_GetBSS(void)  { return 0x1f34; }
        !            61: 
        !            62: /* fake Hatari video variables */
        !            63: #include "screen.h"
        !            64: #include "video.h"
        !            65: int nHBL = 20;
        !            66: int nVBLs = 71;
        !            67: 
        !            68: /* fake video variables accessor */
        !            69: void Video_GetPosition(int *pFrameCycles, int *pHBL, int *pLineCycles)
        !            70: {
        !            71:        *pFrameCycles = 2048;
        !            72:        *pHBL = nHBL;
        !            73:        *pFrameCycles = 508;
        !            74: }
        !            75: 
        !            76: /* only function needed from file.c */
        !            77: #include <sys/stat.h>
        !            78: #include <sys/time.h>
        !            79: #include "file.h"
        !            80: bool File_Exists(const char *filename)
        !            81: {
        !            82:        struct stat buf;
        !            83:        if (stat(filename, &buf) == 0 &&
        !            84:            (buf.st_mode & (S_IRUSR|S_IWUSR)) && !(buf.st_mode & S_IFDIR))
        !            85:        {
        !            86:                /* file points to user readable regular file */
        !            87:                return true;
        !            88:        }
        !            89:        return false;
        !            90: }
        !            91: 
        !            92: /* fake debugger file parsing */
        !            93: #include "debugui.h"
        !            94: bool DebugUI_ParseFile(const char *path)
        !            95: {
        !            96:        return File_Exists(path);
        !            97: }
        !            98: 
        !            99: /* fake disassembly output */
        !           100: #include "68kDisass.h"
        !           101: void Disasm (FILE *f, uaecptr addr, uaecptr *nextpc, int cnt , int DisasmEngine) {}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.