sim-signal.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Simulator signal support
  2. Copyright (C) 1997-2015 Free Software Foundation, Inc.
  3. Contributed by Cygnus Support
  4. This file is part of the GNU Simulators.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. #ifndef SIM_SIGNAL_H
  16. #define SIM_SIGNAL_H
  17. #include "gdb/signals.h"
  18. /* Signals we use.
  19. This provides a layer between our values and host/target values. */
  20. typedef enum {
  21. SIM_SIGNONE = 64,
  22. /* illegal insn */
  23. SIM_SIGILL,
  24. /* breakpoint */
  25. SIM_SIGTRAP,
  26. /* misaligned memory access */
  27. SIM_SIGBUS,
  28. /* tried to read/write memory that's not readable/writable */
  29. SIM_SIGSEGV,
  30. /* cpu limit exceeded */
  31. SIM_SIGXCPU,
  32. /* simulation interrupted (sim_stop called) */
  33. SIM_SIGINT,
  34. /* Floating point or integer divide */
  35. SIM_SIGFPE,
  36. /* simulation aborted */
  37. SIM_SIGABRT
  38. } SIM_SIGNAL;
  39. int sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL);
  40. enum gdb_signal sim_signal_to_gdb_signal (SIM_DESC sd, SIM_SIGNAL);
  41. #endif /* SIM_SIGNAL_H */