Files
kichikuou_xsystem35-sdl2/src/dri.h
T
kichikuou e5fab0f198 Add source-level debugger
If -debug option is specified, xsystem35 enables built-in debugger. It
optionally loads debug information from *SA.ALD.symbols file (generated
by xsys35c), and drops into a debugger REPL.

Currently the debugger supports:
- Simple breakpoints
- Backtrace
- Single-step execution (step into / step over)
- Printing variables

Also, when the debugger is enabled SIGINT breaks execution and enters a
REPL.
2021-07-18 22:55:22 +09:00

63 lines
2.0 KiB
C

/*
* dri.h: dri loader
*
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
* 1998- <masaki-c@is.aist-nara.ac.jp>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
/* $Id: dri.h,v 1.8 2001/04/02 21:00:44 chikama Exp $ */
#ifndef __DRI__
#define __DRI__
#include "portab.h"
#include "mmap.h"
#define DRIFILEMAX 255 /* maximum file number for one data type */
#define DRIDATAMAX 65535 /* maximum file number in one file */
struct _drifiles {
/* for mmap */
boolean mmapped;
mmap_t *mmap[DRIFILEMAX];
/* for file access */
char *fnames[DRIFILEMAX];
/* max file number in files */
int maxfile;
/* file mapping */
char *map_disk;
short *map_ptr;
/* pointers in file */
int *fileptr[DRIFILEMAX];
};
typedef struct _drifiles drifiles;
struct _dridata {
int size; /* size of real data */
char *data_raw; /* dri header pointer */
char *data; /* real data */
char *name; /* not used */
int refcnt; /* reference count */
drifiles *a; /* archive file obj */
};
typedef struct _dridata dridata;
extern drifiles *dri_init(const char **file, int cnt, boolean use_mmap);
extern dridata *dri_getdata(drifiles *d, int no);
#endif /* !__DRI__ */