sim.h 1.09 KB

/*************************************************************************
 *
 *  File: sim.h
 *
 *  This file contains definitions for simulation environment.
 *
 *  $Header: /root/leakn64/depot/rf/sw/n64os20l/iosim/src/sim.h,v 1.2 2002/05/30 05:54:41 whs Exp $
 *
 */

#ifdef __sgi__
	#include <sys/inst.h>
#endif
#include <sys/types.h>

typedef union mips_instruction minst_t;
typedef void	(*entry_t)(void);

typedef struct descriptor {
	entry_t	entry;
	long	addr;
	int	size;
} descriptor_t;

/*
 * exports from breakpoint.c
 */
extern void	breakpoint_init(descriptor_t *);

/*
 * exports from address.c
 */
extern void	ExceptionHandlerInit(void);

/*
 * exports from misc.c
 */
extern void		ExecServer(char *);
extern void		WaitServer(void);
extern int		FindServer(void);
extern int		LoadApp(char *, descriptor_t *);
extern const char	*elf_error(void);

/*
 * exports from memory.c
 */

typedef	unsigned int	dir_t;
typedef	unsigned int	sz_t;

typedef enum {REF_INST, REF_DATA} ref_t;

extern void	memory_access(ulong, ref_t, dir_t, sz_t);
extern void	memory_stats(void);

#ifndef NULL
#define	NULL	0
#endif