1 /* This file is part of the program psim.
3 Copyright (C) 1994-1996, Andrew Cagney <cagney@highland.com.au>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <http://www.gnu.org/licenses/>.
26 #include "gdb/remote-sim.h"
28 /* the system object */
29 /* typedef struct _psim psim; */
30 /* typedef struct _device device; */
32 /* when the `system' stops, find out why. FIXME - at this point this
33 is really a bit puzzling. After all, how can there be a status
34 when there several processors involved */
36 typedef struct _psim_status {
40 unsigned_word program_counter;
44 /* create an initial device tree and then populate it using
45 information obtained from either the command line or a file */
47 extern device *psim_tree
50 extern char **psim_options
55 extern void psim_command
60 extern void psim_merge_device_file
62 const char *file_name);
64 extern void psim_usage
65 (int verbose, int help, SIM_OPEN_KIND kind);
68 /* create a new simulator from the device tree */
70 extern psim *psim_create
71 (const char *file_name,
75 /* Given the created simulator (re) initialize it */
80 extern void psim_stack
86 /* Run/stop the system */
94 extern void psim_restart
98 extern void psim_set_halt_and_restart
101 void *restart_jmp_buf);
103 extern void psim_clear_halt_and_restart
106 extern void psim_stop
109 extern void psim_halt
115 extern int psim_last_cpu
118 extern int psim_nr_cpus
122 extern psim_status psim_get_status
126 /* reveal the internals of the simulation. Grant access to the
127 processor (cpu) device tree (device) and events (event_queue). */
133 extern device *psim_device
137 extern event_queue *psim_event_queue
142 /* Manipulate the state (registers or memory) of a processor within
143 the system. In the case of memory, the read/write is performed
144 using the specified processors address translation tables.
146 Where applicable, WHICH_CPU == -1 indicates all processors and
147 WHICH_CPU == <nr_cpus> indicates the `current' processor.
149 The register functions return the size of the register, or 0 if the
150 register's name is not recognized. */
152 extern int psim_read_register
155 void *host_ordered_buf,
159 extern int psim_write_register
166 extern unsigned psim_read_memory
173 extern unsigned psim_write_memory
179 int violate_read_only_section);
181 extern void psim_print_info
185 #endif /* _PSIM_H_ */