1 /* The common simulator framework for GDB, the GNU Debugger.
3 Copyright 2002-2014 Free Software Foundation, Inc.
5 Contributed by Andrew Cagney and Red Hat.
7 This file is part of GDB.
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
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
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.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 #ifndef _SIM_BASICS_H_
24 #define _SIM_BASICS_H_
27 /* Basic configuration */
33 /* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
34 bring potential conflicts out in the open */
41 extern int vasprintf (char **result
, const char *format
, va_list args
);
42 extern int asprintf (char **result
, const char *format
, ...);
52 /* Some versions of GCC include an attribute operator, define it */
54 #if !defined (__attribute__)
55 #if (!defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
56 #define __attribute__(arg)
61 /* Global types that code manipulates */
63 typedef struct _device device
;
68 /* Generic address space (maps) and access attributes */
75 nr_maps
= 32, /* something small */
80 access_read
= 1 << read_map
,
81 access_write
= 1 << write_map
,
82 access_exec
= 1 << exec_map
,
83 access_io
= 1 << io_map
,
87 access_read_write
= (access_read
| access_write
),
88 access_read_exec
= (access_read
| access_exec
),
89 access_write_exec
= (access_write
| access_exec
),
90 access_read_write_exec
= (access_read
| access_write
| access_exec
),
91 access_read_io
= (access_read
| access_io
),
92 access_write_io
= (access_write
| access_io
),
93 access_read_write_io
= (access_read
| access_write
| access_io
),
94 access_exec_io
= (access_exec
| access_io
),
95 access_read_exec_io
= (access_read
| access_exec
| access_io
),
96 access_write_exec_io
= (access_write
| access_exec
| access_io
),
97 access_read_write_exec_io
= (access_read
| access_write
| access_exec
| access_io
),
101 /* disposition of an object when things are reset */
106 } object_disposition
;
109 /* Memory transfer types */
111 typedef enum _transfer_type
{
127 /* Basic definitions - ordered so that nothing calls what comes after it. */
129 /* FIXME: conditionalizing tconfig.h on HAVE_CONFIG_H seems wrong. */
134 #include "ansidecl.h"
135 #include "gdb/callback.h"
136 #include "gdb/remote-sim.h"
138 #include "sim-config.h"
140 #include "sim-inline.h"
142 #include "sim-types.h"
143 #include "sim-bits.h"
144 #include "sim-endian.h"
145 #include "sim-signal.h"
146 #include "sim-arange.h"
148 #include "sim-utils.h"
150 /* Note: Only the simpler interfaces are defined here. More heavy
151 weight objects, such as core and events, are defined in the more
152 serious sim-base.h header. */
154 #endif /* _SIM_BASICS_H_ */