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