xref: /netbsd/external/gpl3/gdb/dist/sim/bpf/sim-main.h (revision 1424dfb3)
1*1424dfb3Schristos /* eBPF simulator main header
2*1424dfb3Schristos    Copyright (C) 2020 Free Software Foundation, Inc.
3*1424dfb3Schristos 
4*1424dfb3Schristos    This file is part of GDB, the GNU debugger.
5*1424dfb3Schristos 
6*1424dfb3Schristos    This program is free software; you can redistribute it and/or modify
7*1424dfb3Schristos    it under the terms of the GNU General Public License as published by
8*1424dfb3Schristos    the Free Software Foundation; either version 3 of the License, or
9*1424dfb3Schristos    (at your option) any later version.
10*1424dfb3Schristos 
11*1424dfb3Schristos    This program is distributed in the hope that it will be useful,
12*1424dfb3Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*1424dfb3Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*1424dfb3Schristos    GNU General Public License for more details.
15*1424dfb3Schristos 
16*1424dfb3Schristos    You should have received a copy of the GNU General Public License
17*1424dfb3Schristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
18*1424dfb3Schristos 
19*1424dfb3Schristos #ifndef SIM_MAIN_H
20*1424dfb3Schristos #define SIM_MAIN_H
21*1424dfb3Schristos 
22*1424dfb3Schristos #include "sim-basics.h"
23*1424dfb3Schristos #include "cgen-types.h"
24*1424dfb3Schristos #include "bpf-desc.h"
25*1424dfb3Schristos #include "bpf-opc.h"
26*1424dfb3Schristos #include "arch.h"
27*1424dfb3Schristos #include "sim-base.h"
28*1424dfb3Schristos #include "cgen-sim.h"
29*1424dfb3Schristos #include "bpf-sim.h"
30*1424dfb3Schristos 
31*1424dfb3Schristos 
32*1424dfb3Schristos struct _sim_cpu
33*1424dfb3Schristos {
34*1424dfb3Schristos   sim_cpu_base base;
35*1424dfb3Schristos   CGEN_CPU cgen_cpu;
36*1424dfb3Schristos 
37*1424dfb3Schristos #if defined (WANT_CPU_BPFBF)
38*1424dfb3Schristos   BPFBF_CPU_DATA cpu_data;
39*1424dfb3Schristos #endif
40*1424dfb3Schristos };
41*1424dfb3Schristos 
42*1424dfb3Schristos 
43*1424dfb3Schristos 
44*1424dfb3Schristos struct sim_state
45*1424dfb3Schristos {
46*1424dfb3Schristos   sim_cpu *cpu[MAX_NR_PROCESSORS];
47*1424dfb3Schristos   CGEN_STATE cgen_state;
48*1424dfb3Schristos   sim_state_base base;
49*1424dfb3Schristos };
50*1424dfb3Schristos 
51*1424dfb3Schristos #endif /* ! SIM_MAIN_H */
52