gdb/testsuite: add some xfail in gdb.base/startup-with-shell.exp
[binutils-gdb.git] / sim / common / sim-basics.h
blob6fc0be9e6d2245b630f985d7d8985a9b29b24d7a
1 /* The common simulator framework for GDB, the GNU Debugger.
3 Copyright 2002-2024 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 */
29 #include "defs.h"
31 /* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
32 bring potential conflicts out in the open */
34 #include <setjmp.h>
35 #include <stdarg.h>
36 #include <stdio.h>
39 #ifndef min
40 #define min(a, b) ((a) < (b) ? (a) : (b))
41 #endif
42 #ifndef max
43 #define max(a, b) ((a) > (b) ? (a) : (b))
44 #endif
47 /* Global types that code manipulates */
49 struct hw;
50 struct _sim_fpu;
53 /* Generic address space (maps) and access attributes */
55 enum {
56 read_map = 0,
57 write_map = 1,
58 exec_map = 2,
59 io_map = 3,
60 nr_maps = 32, /* something small */
63 enum {
64 access_invalid = 0,
65 access_read = 1 << read_map,
66 access_write = 1 << write_map,
67 access_exec = 1 << exec_map,
68 access_io = 1 << io_map,
71 enum {
72 access_read_write = (access_read | access_write),
73 access_read_exec = (access_read | access_exec),
74 access_write_exec = (access_write | access_exec),
75 access_read_write_exec = (access_read | access_write | access_exec),
76 access_read_io = (access_read | access_io),
77 access_write_io = (access_write | access_io),
78 access_read_write_io = (access_read | access_write | access_io),
79 access_exec_io = (access_exec | access_io),
80 access_read_exec_io = (access_read | access_exec | access_io),
81 access_write_exec_io = (access_write | access_exec | access_io),
82 access_read_write_exec_io = (access_read | access_write | access_exec | access_io),
86 /* disposition of an object when things are reset */
88 typedef enum {
89 permanent_object,
90 temporary_object,
91 } object_disposition;
94 /* Memory transfer types */
96 typedef enum _transfer_type {
97 read_transfer,
98 write_transfer,
99 } transfer_type;
102 /* directions */
104 typedef enum {
105 bidirect_port,
106 input_port,
107 output_port,
108 } port_direction;
112 /* Basic definitions - ordered so that nothing calls what comes after it. */
114 #include "sim/sim.h"
116 #include "sim-config.h"
118 #include "sim-inline.h"
120 #include "sim-types.h"
121 #include "sim-bits.h"
122 #include "sim-endian.h"
124 #include "sim-utils.h"
126 /* Note: Only the simpler interfaces are defined here. More heavy
127 weight objects, such as core and events, are defined in the more
128 serious sim-base.h header. */
130 #endif /* SIM_BASICS_H */