xref: /netbsd-src/external/gpl3/gdb/dist/sim/common/target-newlib-signal.c (revision 88241920d21b339bf319c0e979ffda80c49a2936)
14b169a6bSchristos /* Target errno mappings for newlib/libgloss environment.
2*88241920Schristos    Copyright 1995-2024 Free Software Foundation, Inc.
34b169a6bSchristos    Contributed by Mike Frysinger.
44b169a6bSchristos 
54b169a6bSchristos    This file is part of simulators.
64b169a6bSchristos 
74b169a6bSchristos    This program is free software; you can redistribute it and/or modify
84b169a6bSchristos    it under the terms of the GNU General Public License as published by
94b169a6bSchristos    the Free Software Foundation; either version 3 of the License, or
104b169a6bSchristos    (at your option) any later version.
114b169a6bSchristos 
124b169a6bSchristos    This program is distributed in the hope that it will be useful,
134b169a6bSchristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
144b169a6bSchristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
154b169a6bSchristos    GNU General Public License for more details.
164b169a6bSchristos 
174b169a6bSchristos    You should have received a copy of the GNU General Public License
184b169a6bSchristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
194b169a6bSchristos 
204b169a6bSchristos /* This must come before any other includes.  */
214b169a6bSchristos #include "defs.h"
224b169a6bSchristos 
234b169a6bSchristos #include <signal.h>
244b169a6bSchristos 
254b169a6bSchristos #include "sim/callback.h"
264b169a6bSchristos 
274b169a6bSchristos /* This file is kept up-to-date via the gennltvals.py script.  Do not edit
284b169a6bSchristos    anything between the START & END comment blocks below.  */
294b169a6bSchristos 
304b169a6bSchristos CB_TARGET_DEFS_MAP cb_init_signal_map[] = {
314b169a6bSchristos   /* gennltvals: START */
324b169a6bSchristos #ifdef SIGABRT
334b169a6bSchristos   { "SIGABRT", SIGABRT, 6 },
344b169a6bSchristos #endif
354b169a6bSchristos #ifdef SIGALRM
364b169a6bSchristos   { "SIGALRM", SIGALRM, 14 },
374b169a6bSchristos #endif
384b169a6bSchristos #ifdef SIGBUS
394b169a6bSchristos   { "SIGBUS", SIGBUS, 10 },
404b169a6bSchristos #endif
414b169a6bSchristos #ifdef SIGCHLD
424b169a6bSchristos   { "SIGCHLD", SIGCHLD, 20 },
434b169a6bSchristos #endif
444b169a6bSchristos #ifdef SIGCLD
454b169a6bSchristos   { "SIGCLD", SIGCLD, 20 },
464b169a6bSchristos #endif
474b169a6bSchristos #ifdef SIGCONT
484b169a6bSchristos   { "SIGCONT", SIGCONT, 19 },
494b169a6bSchristos #endif
504b169a6bSchristos #ifdef SIGEMT
514b169a6bSchristos   { "SIGEMT", SIGEMT, 7 },
524b169a6bSchristos #endif
534b169a6bSchristos #ifdef SIGFPE
544b169a6bSchristos   { "SIGFPE", SIGFPE, 8 },
554b169a6bSchristos #endif
564b169a6bSchristos #ifdef SIGHUP
574b169a6bSchristos   { "SIGHUP", SIGHUP, 1 },
584b169a6bSchristos #endif
594b169a6bSchristos #ifdef SIGILL
604b169a6bSchristos   { "SIGILL", SIGILL, 4 },
614b169a6bSchristos #endif
624b169a6bSchristos #ifdef SIGINT
634b169a6bSchristos   { "SIGINT", SIGINT, 2 },
644b169a6bSchristos #endif
654b169a6bSchristos #ifdef SIGIO
664b169a6bSchristos   { "SIGIO", SIGIO, 23 },
674b169a6bSchristos #endif
684b169a6bSchristos #ifdef SIGIOT
694b169a6bSchristos   { "SIGIOT", SIGIOT, 6 },
704b169a6bSchristos #endif
714b169a6bSchristos #ifdef SIGKILL
724b169a6bSchristos   { "SIGKILL", SIGKILL, 9 },
734b169a6bSchristos #endif
744b169a6bSchristos #ifdef SIGLOST
754b169a6bSchristos   { "SIGLOST", SIGLOST, 29 },
764b169a6bSchristos #endif
774b169a6bSchristos #ifdef SIGPIPE
784b169a6bSchristos   { "SIGPIPE", SIGPIPE, 13 },
794b169a6bSchristos #endif
804b169a6bSchristos #ifdef SIGPOLL
814b169a6bSchristos   { "SIGPOLL", SIGPOLL, 23 },
824b169a6bSchristos #endif
834b169a6bSchristos #ifdef SIGPROF
844b169a6bSchristos   { "SIGPROF", SIGPROF, 27 },
854b169a6bSchristos #endif
864b169a6bSchristos #ifdef SIGQUIT
874b169a6bSchristos   { "SIGQUIT", SIGQUIT, 3 },
884b169a6bSchristos #endif
894b169a6bSchristos #ifdef SIGSEGV
904b169a6bSchristos   { "SIGSEGV", SIGSEGV, 11 },
914b169a6bSchristos #endif
924b169a6bSchristos #ifdef SIGSTOP
934b169a6bSchristos   { "SIGSTOP", SIGSTOP, 17 },
944b169a6bSchristos #endif
954b169a6bSchristos #ifdef SIGSYS
964b169a6bSchristos   { "SIGSYS", SIGSYS, 12 },
974b169a6bSchristos #endif
984b169a6bSchristos #ifdef SIGTERM
994b169a6bSchristos   { "SIGTERM", SIGTERM, 15 },
1004b169a6bSchristos #endif
1014b169a6bSchristos #ifdef SIGTRAP
1024b169a6bSchristos   { "SIGTRAP", SIGTRAP, 5 },
1034b169a6bSchristos #endif
1044b169a6bSchristos #ifdef SIGTSTP
1054b169a6bSchristos   { "SIGTSTP", SIGTSTP, 18 },
1064b169a6bSchristos #endif
1074b169a6bSchristos #ifdef SIGTTIN
1084b169a6bSchristos   { "SIGTTIN", SIGTTIN, 21 },
1094b169a6bSchristos #endif
1104b169a6bSchristos #ifdef SIGTTOU
1114b169a6bSchristos   { "SIGTTOU", SIGTTOU, 22 },
1124b169a6bSchristos #endif
1134b169a6bSchristos #ifdef SIGURG
1144b169a6bSchristos   { "SIGURG", SIGURG, 16 },
1154b169a6bSchristos #endif
1164b169a6bSchristos #ifdef SIGUSR1
1174b169a6bSchristos   { "SIGUSR1", SIGUSR1, 30 },
1184b169a6bSchristos #endif
1194b169a6bSchristos #ifdef SIGUSR2
1204b169a6bSchristos   { "SIGUSR2", SIGUSR2, 31 },
1214b169a6bSchristos #endif
1224b169a6bSchristos #ifdef SIGVTALRM
1234b169a6bSchristos   { "SIGVTALRM", SIGVTALRM, 26 },
1244b169a6bSchristos #endif
1254b169a6bSchristos #ifdef SIGWINCH
1264b169a6bSchristos   { "SIGWINCH", SIGWINCH, 28 },
1274b169a6bSchristos #endif
1284b169a6bSchristos #ifdef SIGXCPU
1294b169a6bSchristos   { "SIGXCPU", SIGXCPU, 24 },
1304b169a6bSchristos #endif
1314b169a6bSchristos #ifdef SIGXFSZ
1324b169a6bSchristos   { "SIGXFSZ", SIGXFSZ, 25 },
1334b169a6bSchristos #endif
1344b169a6bSchristos   /* gennltvals: END */
1354b169a6bSchristos   { NULL, -1, -1 },
1364b169a6bSchristos };
137