sim: clean up some more device detritus
[deliverable/binutils-gdb.git] / sim / common / sim-basics.h
CommitLineData
b85e4829
AC
1/* The common simulator framework for GDB, the GNU Debugger.
2
618f726f 3 Copyright 2002-2016 Free Software Foundation, Inc.
b85e4829
AC
4
5 Contributed by Andrew Cagney and Red Hat.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
4744ac1b 11 the Free Software Foundation; either version 3 of the License, or
b85e4829
AC
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
4744ac1b 20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c906108c
SS
21
22
618b526e
MF
23#ifndef SIM_BASICS_H
24#define SIM_BASICS_H
c906108c
SS
25
26
27/* Basic configuration */
28
29#ifdef HAVE_CONFIG_H
41ee5402 30#include "cconfig.h"
c906108c
SS
31#endif
32
33/* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
34 bring potential conflicts out in the open */
35
36#include <stdarg.h>
37#include <stdio.h>
38#include <setjmp.h>
39
40#ifdef __CYGWIN32__
41extern int vasprintf (char **result, const char *format, va_list args);
42extern int asprintf (char **result, const char *format, ...);
43#endif
44
45
46#ifndef NULL
47#define NULL 0
48#endif
49
50
028f6515 51
c906108c
SS
52/* Some versions of GCC include an attribute operator, define it */
53
54#if !defined (__attribute__)
55#if (!defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
56#define __attribute__(arg)
57#endif
58#endif
59
60
61/* Global types that code manipulates */
62
c906108c
SS
63struct hw;
64struct _sim_fpu;
65
66
67/* Generic address space (maps) and access attributes */
68
69enum {
70 read_map = 0,
71 write_map = 1,
72 exec_map = 2,
73 io_map = 3,
74 nr_maps = 32, /* something small */
75};
76
77enum {
78 access_invalid = 0,
79 access_read = 1 << read_map,
80 access_write = 1 << write_map,
81 access_exec = 1 << exec_map,
82 access_io = 1 << io_map,
83};
84
85enum {
86 access_read_write = (access_read | access_write),
87 access_read_exec = (access_read | access_exec),
88 access_write_exec = (access_write | access_exec),
89 access_read_write_exec = (access_read | access_write | access_exec),
90 access_read_io = (access_read | access_io),
91 access_write_io = (access_write | access_io),
92 access_read_write_io = (access_read | access_write | access_io),
93 access_exec_io = (access_exec | access_io),
94 access_read_exec_io = (access_read | access_exec | access_io),
95 access_write_exec_io = (access_write | access_exec | access_io),
96 access_read_write_exec_io = (access_read | access_write | access_exec | access_io),
97};
98
99
100/* disposition of an object when things are reset */
101
102typedef enum {
103 permenant_object,
104 temporary_object,
105} object_disposition;
106
107
108/* Memory transfer types */
109
110typedef enum _transfer_type {
111 read_transfer,
112 write_transfer,
113} transfer_type;
114
115
116/* directions */
117
118typedef enum {
119 bidirect_port,
120 input_port,
121 output_port,
122} port_direction;
123
124
125\f
126/* Basic definitions - ordered so that nothing calls what comes after it. */
127
c906108c 128#include "ansidecl.h"
3c25f8c7
AC
129#include "gdb/callback.h"
130#include "gdb/remote-sim.h"
c906108c
SS
131
132#include "sim-config.h"
133
134#include "sim-inline.h"
135
136#include "sim-types.h"
137#include "sim-bits.h"
138#include "sim-endian.h"
139#include "sim-signal.h"
140#include "sim-arange.h"
141
142#include "sim-utils.h"
143
144/* Note: Only the simpler interfaces are defined here. More heavy
145 weight objects, such as core and events, are defined in the more
146 serious sim-base.h header. */
147
618b526e 148#endif /* SIM_BASICS_H */
This page took 0.668632 seconds and 4 git commands to generate.