Watchpoint interface.
[deliverable/binutils-gdb.git] / sim / tic80 / sim-main.h
1 /* This file is part of the program psim.
2
3 Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
4 Copyright (C) 1997, Free Software Foundation
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 */
21
22
23 #ifndef _SIM_MAIN_H_
24 #define _SIM_MAIN_H_
25
26 #include "sim-basics.h"
27
28 #include <signal.h>
29 #include <errno.h>
30 #ifdef HAVE_UNISTD_H
31 #include <unistd.h>
32 #endif
33
34 /* These are generated files. */
35 #include "itable.h"
36 #include "idecode.h"
37 #include "idecode.h"
38
39 typedef instruction_address sim_cia;
40 static const sim_cia null_cia = {0}; /* Dummy */
41 #define NULL_CIA null_cia
42
43 #include "sim-base.h"
44
45 #include "alu.h"
46 #include "cpu.h"
47
48
49 struct sim_state {
50
51 /* escape route for inner functions */
52 int halt_ok;
53 jmp_buf path_to_halt;
54 int restart_ok;
55 jmp_buf path_to_restart;
56
57 /* status from last halt */
58 enum sim_stop reason;
59 int siggnal;
60
61 /* the processors proper */
62 sim_cpu cpu;
63 #define STATE_CPU(sd, n) (&(sd)->cpu)
64
65 /* The base class. */
66 sim_state_base base;
67
68 };
69
70 /* (re) initialize the simulator */
71
72 extern void engine_init
73 (SIM_DESC sd);
74
75
76 #ifndef HAVE_GETPID
77 #define getpid() 42
78 #endif
79
80 #ifndef HAVE_KILL
81 #define kill() (errno = EINVAL, -1)
82 #endif
83 #endif
This page took 0.030398 seconds and 4 git commands to generate.