xref: /netbsd-src/external/gpl3/gdb/dist/sim/common/sim-signal.h (revision 88241920d21b339bf319c0e979ffda80c49a2936)
14e98e3e1Schristos /* Simulator signal support
2*88241920Schristos    Copyright (C) 1997-2024 Free Software Foundation, Inc.
34e98e3e1Schristos    Contributed by Cygnus Support
44e98e3e1Schristos 
54e98e3e1Schristos This file is part of the GNU Simulators.
64e98e3e1Schristos 
74e98e3e1Schristos This program is free software; you can redistribute it and/or modify
84e98e3e1Schristos it under the terms of the GNU General Public License as published by
94e98e3e1Schristos the Free Software Foundation; either version 3 of the License, or
104e98e3e1Schristos (at your option) any later version.
114e98e3e1Schristos 
124e98e3e1Schristos This program is distributed in the hope that it will be useful,
134e98e3e1Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of
144e98e3e1Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
154e98e3e1Schristos GNU General Public License for more details.
164e98e3e1Schristos 
174e98e3e1Schristos You should have received a copy of the GNU General Public License
184e98e3e1Schristos along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
194e98e3e1Schristos 
204e98e3e1Schristos #ifndef SIM_SIGNAL_H
214e98e3e1Schristos #define SIM_SIGNAL_H
224e98e3e1Schristos 
234e98e3e1Schristos #include "gdb/signals.h"
244e98e3e1Schristos 
254e98e3e1Schristos /* Signals we use.
264e98e3e1Schristos    This provides a layer between our values and host/target values.  */
274e98e3e1Schristos 
284e98e3e1Schristos typedef enum {
294e98e3e1Schristos   SIM_SIGNONE = 64,
304e98e3e1Schristos   /* illegal insn */
314e98e3e1Schristos   SIM_SIGILL,
324e98e3e1Schristos   /* breakpoint */
334e98e3e1Schristos   SIM_SIGTRAP,
344e98e3e1Schristos   /* misaligned memory access */
354e98e3e1Schristos   SIM_SIGBUS,
364e98e3e1Schristos   /* tried to read/write memory that's not readable/writable */
374e98e3e1Schristos   SIM_SIGSEGV,
384e98e3e1Schristos   /* cpu limit exceeded */
394e98e3e1Schristos   SIM_SIGXCPU,
404e98e3e1Schristos   /* simulation interrupted (sim_stop called) */
414e98e3e1Schristos   SIM_SIGINT,
424e98e3e1Schristos   /* Floating point or integer divide */
434e98e3e1Schristos   SIM_SIGFPE,
444e98e3e1Schristos   /* simulation aborted */
454e98e3e1Schristos   SIM_SIGABRT
464e98e3e1Schristos } SIM_SIGNAL;
474e98e3e1Schristos 
484e98e3e1Schristos int sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL);
49a2e2270fSchristos enum gdb_signal sim_signal_to_gdb_signal (SIM_DESC sd, SIM_SIGNAL);
504e98e3e1Schristos 
514e98e3e1Schristos #endif /* SIM_SIGNAL_H */
52