From: Jan Kratochvil Date: Sat, 31 Jul 2010 04:17:44 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a19cae166603bc5ac2c9a3e2b2dfb66faeeb3f98;p=binutils-gdb.git gdb/ * common/signals.c (signals): Move the content to signals.def. Include it. Remove the INDENT comments. gdb/gdbserver/ * Makefile.in (signals_def): New. (server_h): Append include/gdb/signals.h and signals_def. (server.o): Append signals_def. include/gdb/ * signals.h (enum target_signal): Move the content to signals.def. Include it. * signals.def: New file. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 557d2c667b9..bcb08bad231 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-07-31 Jan Kratochvil + + * common/signals.c (signals): Move the content to signals.def. + Include it. Remove the INDENT comments. + 2010-07-30 Tom Tromey * Makefile.in (install-only): Install gdb-add-index. diff --git a/gdb/common/signals.c b/gdb/common/signals.c index 1dec502738e..ddcc1f33d0f 100644 --- a/gdb/common/signals.c +++ b/gdb/common/signals.c @@ -48,175 +48,19 @@ struct gdbarch; # endif #endif -/* This table must match in order and size the signals in enum target_signal - in src/include/gdb/signals.h. */ -/* *INDENT-OFF* */ +/* This table must match in order and size the signals in enum target_signal. */ + static const struct { const char *name; const char *string; } signals [] = { - {"0", "Signal 0"}, - {"SIGHUP", "Hangup"}, - {"SIGINT", "Interrupt"}, - {"SIGQUIT", "Quit"}, - {"SIGILL", "Illegal instruction"}, - {"SIGTRAP", "Trace/breakpoint trap"}, - {"SIGABRT", "Aborted"}, - {"SIGEMT", "Emulation trap"}, - {"SIGFPE", "Arithmetic exception"}, - {"SIGKILL", "Killed"}, - {"SIGBUS", "Bus error"}, - {"SIGSEGV", "Segmentation fault"}, - {"SIGSYS", "Bad system call"}, - {"SIGPIPE", "Broken pipe"}, - {"SIGALRM", "Alarm clock"}, - {"SIGTERM", "Terminated"}, - {"SIGURG", "Urgent I/O condition"}, - {"SIGSTOP", "Stopped (signal)"}, - {"SIGTSTP", "Stopped (user)"}, - {"SIGCONT", "Continued"}, - {"SIGCHLD", "Child status changed"}, - {"SIGTTIN", "Stopped (tty input)"}, - {"SIGTTOU", "Stopped (tty output)"}, - {"SIGIO", "I/O possible"}, - {"SIGXCPU", "CPU time limit exceeded"}, - {"SIGXFSZ", "File size limit exceeded"}, - {"SIGVTALRM", "Virtual timer expired"}, - {"SIGPROF", "Profiling timer expired"}, - {"SIGWINCH", "Window size changed"}, - {"SIGLOST", "Resource lost"}, - {"SIGUSR1", "User defined signal 1"}, - {"SIGUSR2", "User defined signal 2"}, - {"SIGPWR", "Power fail/restart"}, - {"SIGPOLL", "Pollable event occurred"}, - {"SIGWIND", "SIGWIND"}, - {"SIGPHONE", "SIGPHONE"}, - {"SIGWAITING", "Process's LWPs are blocked"}, - {"SIGLWP", "Signal LWP"}, - {"SIGDANGER", "Swap space dangerously low"}, - {"SIGGRANT", "Monitor mode granted"}, - {"SIGRETRACT", "Need to relinquish monitor mode"}, - {"SIGMSG", "Monitor mode data available"}, - {"SIGSOUND", "Sound completed"}, - {"SIGSAK", "Secure attention"}, - {"SIGPRIO", "SIGPRIO"}, - {"SIG33", "Real-time event 33"}, - {"SIG34", "Real-time event 34"}, - {"SIG35", "Real-time event 35"}, - {"SIG36", "Real-time event 36"}, - {"SIG37", "Real-time event 37"}, - {"SIG38", "Real-time event 38"}, - {"SIG39", "Real-time event 39"}, - {"SIG40", "Real-time event 40"}, - {"SIG41", "Real-time event 41"}, - {"SIG42", "Real-time event 42"}, - {"SIG43", "Real-time event 43"}, - {"SIG44", "Real-time event 44"}, - {"SIG45", "Real-time event 45"}, - {"SIG46", "Real-time event 46"}, - {"SIG47", "Real-time event 47"}, - {"SIG48", "Real-time event 48"}, - {"SIG49", "Real-time event 49"}, - {"SIG50", "Real-time event 50"}, - {"SIG51", "Real-time event 51"}, - {"SIG52", "Real-time event 52"}, - {"SIG53", "Real-time event 53"}, - {"SIG54", "Real-time event 54"}, - {"SIG55", "Real-time event 55"}, - {"SIG56", "Real-time event 56"}, - {"SIG57", "Real-time event 57"}, - {"SIG58", "Real-time event 58"}, - {"SIG59", "Real-time event 59"}, - {"SIG60", "Real-time event 60"}, - {"SIG61", "Real-time event 61"}, - {"SIG62", "Real-time event 62"}, - {"SIG63", "Real-time event 63"}, - {"SIGCANCEL", "LWP internal signal"}, - {"SIG32", "Real-time event 32"}, - {"SIG64", "Real-time event 64"}, - {"SIG65", "Real-time event 65"}, - {"SIG66", "Real-time event 66"}, - {"SIG67", "Real-time event 67"}, - {"SIG68", "Real-time event 68"}, - {"SIG69", "Real-time event 69"}, - {"SIG70", "Real-time event 70"}, - {"SIG71", "Real-time event 71"}, - {"SIG72", "Real-time event 72"}, - {"SIG73", "Real-time event 73"}, - {"SIG74", "Real-time event 74"}, - {"SIG75", "Real-time event 75"}, - {"SIG76", "Real-time event 76"}, - {"SIG77", "Real-time event 77"}, - {"SIG78", "Real-time event 78"}, - {"SIG79", "Real-time event 79"}, - {"SIG80", "Real-time event 80"}, - {"SIG81", "Real-time event 81"}, - {"SIG82", "Real-time event 82"}, - {"SIG83", "Real-time event 83"}, - {"SIG84", "Real-time event 84"}, - {"SIG85", "Real-time event 85"}, - {"SIG86", "Real-time event 86"}, - {"SIG87", "Real-time event 87"}, - {"SIG88", "Real-time event 88"}, - {"SIG89", "Real-time event 89"}, - {"SIG90", "Real-time event 90"}, - {"SIG91", "Real-time event 91"}, - {"SIG92", "Real-time event 92"}, - {"SIG93", "Real-time event 93"}, - {"SIG94", "Real-time event 94"}, - {"SIG95", "Real-time event 95"}, - {"SIG96", "Real-time event 96"}, - {"SIG97", "Real-time event 97"}, - {"SIG98", "Real-time event 98"}, - {"SIG99", "Real-time event 99"}, - {"SIG100", "Real-time event 100"}, - {"SIG101", "Real-time event 101"}, - {"SIG102", "Real-time event 102"}, - {"SIG103", "Real-time event 103"}, - {"SIG104", "Real-time event 104"}, - {"SIG105", "Real-time event 105"}, - {"SIG106", "Real-time event 106"}, - {"SIG107", "Real-time event 107"}, - {"SIG108", "Real-time event 108"}, - {"SIG109", "Real-time event 109"}, - {"SIG110", "Real-time event 110"}, - {"SIG111", "Real-time event 111"}, - {"SIG112", "Real-time event 112"}, - {"SIG113", "Real-time event 113"}, - {"SIG114", "Real-time event 114"}, - {"SIG115", "Real-time event 115"}, - {"SIG116", "Real-time event 116"}, - {"SIG117", "Real-time event 117"}, - {"SIG118", "Real-time event 118"}, - {"SIG119", "Real-time event 119"}, - {"SIG120", "Real-time event 120"}, - {"SIG121", "Real-time event 121"}, - {"SIG122", "Real-time event 122"}, - {"SIG123", "Real-time event 123"}, - {"SIG124", "Real-time event 124"}, - {"SIG125", "Real-time event 125"}, - {"SIG126", "Real-time event 126"}, - {"SIG127", "Real-time event 127"}, - - {"SIGINFO", "Information request"}, - - {NULL, "Unknown signal"}, - {NULL, "Internal error: printing TARGET_SIGNAL_DEFAULT"}, - - /* Mach exceptions */ - {"EXC_BAD_ACCESS", "Could not access memory"}, - {"EXC_BAD_INSTRUCTION", "Illegal instruction/operand"}, - {"EXC_ARITHMETIC", "Arithmetic exception"}, - {"EXC_EMULATION", "Emulation instruction"}, - {"EXC_SOFTWARE", "Software generated exception"}, - {"EXC_BREAKPOINT", "Breakpoint"}, - - /* Last entry, used to check whether the table is the right size. */ - {NULL, "TARGET_SIGNAL_MAGIC"} +#define SET(symbol, constant, name, string) ANY (symbol, name, string) +#define ANY(symbol, name, string) { name, string }, +#include "gdb/signals.def" +#undef ANY +#undef SET }; -/* *INDENT-ON* */ - /* Return the string for a signal. */ diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index be333067bcc..74abdd7414c 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2010-07-31 Jan Kratochvil + + * Makefile.in (signals_def): New. + (server_h): Append include/gdb/signals.h and signals_def. + (server.o): Append signals_def. + 2010-07-25 Jan Kratochvil * server.c (handle_target_event): Use target_signal_to_host for diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 76577cf2132..a72c8a121c8 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -292,8 +292,10 @@ gdb_proc_service_h = $(srcdir)/gdb_proc_service.h regdat_sh = $(srcdir)/../regformats/regdat.sh regdef_h = $(srcdir)/../regformats/regdef.h regcache_h = $(srcdir)/regcache.h +signals_def = $(srcdir)/../../include/gdb/signals.def server_h = $(srcdir)/server.h $(regcache_h) config.h $(srcdir)/target.h \ - $(srcdir)/mem-break.h $(srcdir)/../common/gdb_signals.h + $(srcdir)/mem-break.h $(srcdir)/../common/gdb_signals.h \ + $(srcdir)/../../include/gdb/signals.h $(signals_def) linux_low_h = $(srcdir)/linux-low.h @@ -333,7 +335,7 @@ mem-break.o: mem-break.c $(server_h) proc-service.o: proc-service.c $(server_h) $(gdb_proc_service_h) regcache.o: regcache.c $(server_h) $(regdef_h) remote-utils.o: remote-utils.c terminal.h $(server_h) -server.o: server.c $(server_h) +server.o: server.c $(server_h) $(signals_def) target.o: target.c $(server_h) thread-db.o: thread-db.c $(server_h) $(linux_low_h) $(gdb_proc_service_h) tracepoint.o: tracepoint.c $(server_h) diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog index b4d2c68bdfa..dd1f2bd1175 100644 --- a/include/gdb/ChangeLog +++ b/include/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-07-31 Jan Kratochvil + + * signals.h (enum target_signal): Move the content to signals.def. + Include it. + * signals.def: New file. + 2010-06-24 Kevin Buettner * sim-rx.h (sim_rx_regnum): Add sim_rx_acc_regnum. Adjust diff --git a/include/gdb/signals.def b/include/gdb/signals.def new file mode 100644 index 00000000000..b383ebe6a5c --- /dev/null +++ b/include/gdb/signals.def @@ -0,0 +1,200 @@ +/* Target signal numbers for GDB and the GDB remote protocol. + Copyright 2010 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Used some places (e.g. stop_signal) to record the concept that + there is no signal. */ +SET (TARGET_SIGNAL_0, 0, "0", "Signal 0") +#define TARGET_SIGNAL_FIRST TARGET_SIGNAL_0 +SET (TARGET_SIGNAL_HUP, 1, "SIGHUP", "Hangup") +SET (TARGET_SIGNAL_INT, 2, "SIGINT", "Interrupt") +SET (TARGET_SIGNAL_QUIT, 3, "SIGQUIT", "Quit") +SET (TARGET_SIGNAL_ILL, 4, "SIGILL", "Illegal instruction") +SET (TARGET_SIGNAL_TRAP, 5, "SIGTRAP", "Trace/breakpoint trap") +SET (TARGET_SIGNAL_ABRT, 6, "SIGABRT", "Aborted") +SET (TARGET_SIGNAL_EMT, 7, "SIGEMT", "Emulation trap") +SET (TARGET_SIGNAL_FPE, 8, "SIGFPE", "Arithmetic exception") +SET (TARGET_SIGNAL_KILL, 9, "SIGKILL", "Killed") +SET (TARGET_SIGNAL_BUS, 10, "SIGBUS", "Bus error") +SET (TARGET_SIGNAL_SEGV, 11, "SIGSEGV", "Segmentation fault") +SET (TARGET_SIGNAL_SYS, 12, "SIGSYS", "Bad system call") +SET (TARGET_SIGNAL_PIPE, 13, "SIGPIPE", "Broken pipe") +SET (TARGET_SIGNAL_ALRM, 14, "SIGALRM", "Alarm clock") +SET (TARGET_SIGNAL_TERM, 15, "SIGTERM", "Terminated") +SET (TARGET_SIGNAL_URG, 16, "SIGURG", "Urgent I/O condition") +SET (TARGET_SIGNAL_STOP, 17, "SIGSTOP", "Stopped (signal)") +SET (TARGET_SIGNAL_TSTP, 18, "SIGTSTP", "Stopped (user)") +SET (TARGET_SIGNAL_CONT, 19, "SIGCONT", "Continued") +SET (TARGET_SIGNAL_CHLD, 20, "SIGCHLD", "Child status changed") +SET (TARGET_SIGNAL_TTIN, 21, "SIGTTIN", "Stopped (tty input)") +SET (TARGET_SIGNAL_TTOU, 22, "SIGTTOU", "Stopped (tty output)") +SET (TARGET_SIGNAL_IO, 23, "SIGIO", "I/O possible") +SET (TARGET_SIGNAL_XCPU, 24, "SIGXCPU", "CPU time limit exceeded") +SET (TARGET_SIGNAL_XFSZ, 25, "SIGXFSZ", "File size limit exceeded") +SET (TARGET_SIGNAL_VTALRM, 26, "SIGVTALRM", "Virtual timer expired") +SET (TARGET_SIGNAL_PROF, 27, "SIGPROF", "Profiling timer expired") +SET (TARGET_SIGNAL_WINCH, 28, "SIGWINCH", "Window size changed") +SET (TARGET_SIGNAL_LOST, 29, "SIGLOST", "Resource lost") +SET (TARGET_SIGNAL_USR1, 30, "SIGUSR1", "User defined signal 1") +SET (TARGET_SIGNAL_USR2, 31, "SIGUSR2", "User defined signal 2") +SET (TARGET_SIGNAL_PWR, 32, "SIGPWR", "Power fail/restart") +/* Similar to SIGIO. Perhaps they should have the same number. */ +SET (TARGET_SIGNAL_POLL, 33, "SIGPOLL", "Pollable event occurred") +SET (TARGET_SIGNAL_WIND, 34, "SIGWIND", "SIGWIND") +SET (TARGET_SIGNAL_PHONE, 35, "SIGPHONE", "SIGPHONE") +SET (TARGET_SIGNAL_WAITING, 36, "SIGWAITING", "Process's LWPs are blocked") +SET (TARGET_SIGNAL_LWP, 37, "SIGLWP", "Signal LWP") +SET (TARGET_SIGNAL_DANGER, 38, "SIGDANGER", "Swap space dangerously low") +SET (TARGET_SIGNAL_GRANT, 39, "SIGGRANT", "Monitor mode granted") +SET (TARGET_SIGNAL_RETRACT, 40, "SIGRETRACT", + "Need to relinquish monitor mode") +SET (TARGET_SIGNAL_MSG, 41, "SIGMSG", "Monitor mode data available") +SET (TARGET_SIGNAL_SOUND, 42, "SIGSOUND", "Sound completed") +SET (TARGET_SIGNAL_SAK, 43, "SIGSAK", "Secure attention") +SET (TARGET_SIGNAL_PRIO, 44, "SIGPRIO", "SIGPRIO") +SET (TARGET_SIGNAL_REALTIME_33, 45, "SIG33", "Real-time event 33") +SET (TARGET_SIGNAL_REALTIME_34, 46, "SIG34", "Real-time event 34") +SET (TARGET_SIGNAL_REALTIME_35, 47, "SIG35", "Real-time event 35") +SET (TARGET_SIGNAL_REALTIME_36, 48, "SIG36", "Real-time event 36") +SET (TARGET_SIGNAL_REALTIME_37, 49, "SIG37", "Real-time event 37") +SET (TARGET_SIGNAL_REALTIME_38, 50, "SIG38", "Real-time event 38") +SET (TARGET_SIGNAL_REALTIME_39, 51, "SIG39", "Real-time event 39") +SET (TARGET_SIGNAL_REALTIME_40, 52, "SIG40", "Real-time event 40") +SET (TARGET_SIGNAL_REALTIME_41, 53, "SIG41", "Real-time event 41") +SET (TARGET_SIGNAL_REALTIME_42, 54, "SIG42", "Real-time event 42") +SET (TARGET_SIGNAL_REALTIME_43, 55, "SIG43", "Real-time event 43") +SET (TARGET_SIGNAL_REALTIME_44, 56, "SIG44", "Real-time event 44") +SET (TARGET_SIGNAL_REALTIME_45, 57, "SIG45", "Real-time event 45") +SET (TARGET_SIGNAL_REALTIME_46, 58, "SIG46", "Real-time event 46") +SET (TARGET_SIGNAL_REALTIME_47, 59, "SIG47", "Real-time event 47") +SET (TARGET_SIGNAL_REALTIME_48, 60, "SIG48", "Real-time event 48") +SET (TARGET_SIGNAL_REALTIME_49, 61, "SIG49", "Real-time event 49") +SET (TARGET_SIGNAL_REALTIME_50, 62, "SIG50", "Real-time event 50") +SET (TARGET_SIGNAL_REALTIME_51, 63, "SIG51", "Real-time event 51") +SET (TARGET_SIGNAL_REALTIME_52, 64, "SIG52", "Real-time event 52") +SET (TARGET_SIGNAL_REALTIME_53, 65, "SIG53", "Real-time event 53") +SET (TARGET_SIGNAL_REALTIME_54, 66, "SIG54", "Real-time event 54") +SET (TARGET_SIGNAL_REALTIME_55, 67, "SIG55", "Real-time event 55") +SET (TARGET_SIGNAL_REALTIME_56, 68, "SIG56", "Real-time event 56") +SET (TARGET_SIGNAL_REALTIME_57, 69, "SIG57", "Real-time event 57") +SET (TARGET_SIGNAL_REALTIME_58, 70, "SIG58", "Real-time event 58") +SET (TARGET_SIGNAL_REALTIME_59, 71, "SIG59", "Real-time event 59") +SET (TARGET_SIGNAL_REALTIME_60, 72, "SIG60", "Real-time event 60") +SET (TARGET_SIGNAL_REALTIME_61, 73, "SIG61", "Real-time event 61") +SET (TARGET_SIGNAL_REALTIME_62, 74, "SIG62", "Real-time event 62") +SET (TARGET_SIGNAL_REALTIME_63, 75, "SIG63", "Real-time event 63") + +/* Used internally by Solaris threads. See signal(5) on Solaris. */ +SET (TARGET_SIGNAL_CANCEL, 76, "SIGCANCEL", "LWP internal signal") + +/* Yes, this pains me, too. But LynxOS didn't have SIG32, and now + GNU/Linux does, and we can't disturb the numbering, since it's + part of the remote protocol. Note that in some GDB's + TARGET_SIGNAL_REALTIME_32 is number 76. */ +ANY (TARGET_SIGNAL_REALTIME_32, "SIG32", "Real-time event 32") +/* Yet another pain, IRIX 6 has SIG64. */ +ANY (TARGET_SIGNAL_REALTIME_64, "SIG64", "Real-time event 64") +/* Yet another pain, GNU/Linux MIPS might go up to 128. */ +ANY (TARGET_SIGNAL_REALTIME_65, "SIG65", "Real-time event 65") +ANY (TARGET_SIGNAL_REALTIME_66, "SIG66", "Real-time event 66") +ANY (TARGET_SIGNAL_REALTIME_67, "SIG67", "Real-time event 67") +ANY (TARGET_SIGNAL_REALTIME_68, "SIG68", "Real-time event 68") +ANY (TARGET_SIGNAL_REALTIME_69, "SIG69", "Real-time event 69") +ANY (TARGET_SIGNAL_REALTIME_70, "SIG70", "Real-time event 70") +ANY (TARGET_SIGNAL_REALTIME_71, "SIG71", "Real-time event 71") +ANY (TARGET_SIGNAL_REALTIME_72, "SIG72", "Real-time event 72") +ANY (TARGET_SIGNAL_REALTIME_73, "SIG73", "Real-time event 73") +ANY (TARGET_SIGNAL_REALTIME_74, "SIG74", "Real-time event 74") +ANY (TARGET_SIGNAL_REALTIME_75, "SIG75", "Real-time event 75") +ANY (TARGET_SIGNAL_REALTIME_76, "SIG76", "Real-time event 76") +ANY (TARGET_SIGNAL_REALTIME_77, "SIG77", "Real-time event 77") +ANY (TARGET_SIGNAL_REALTIME_78, "SIG78", "Real-time event 78") +ANY (TARGET_SIGNAL_REALTIME_79, "SIG79", "Real-time event 79") +ANY (TARGET_SIGNAL_REALTIME_80, "SIG80", "Real-time event 80") +ANY (TARGET_SIGNAL_REALTIME_81, "SIG81", "Real-time event 81") +ANY (TARGET_SIGNAL_REALTIME_82, "SIG82", "Real-time event 82") +ANY (TARGET_SIGNAL_REALTIME_83, "SIG83", "Real-time event 83") +ANY (TARGET_SIGNAL_REALTIME_84, "SIG84", "Real-time event 84") +ANY (TARGET_SIGNAL_REALTIME_85, "SIG85", "Real-time event 85") +ANY (TARGET_SIGNAL_REALTIME_86, "SIG86", "Real-time event 86") +ANY (TARGET_SIGNAL_REALTIME_87, "SIG87", "Real-time event 87") +ANY (TARGET_SIGNAL_REALTIME_88, "SIG88", "Real-time event 88") +ANY (TARGET_SIGNAL_REALTIME_89, "SIG89", "Real-time event 89") +ANY (TARGET_SIGNAL_REALTIME_90, "SIG90", "Real-time event 90") +ANY (TARGET_SIGNAL_REALTIME_91, "SIG91", "Real-time event 91") +ANY (TARGET_SIGNAL_REALTIME_92, "SIG92", "Real-time event 92") +ANY (TARGET_SIGNAL_REALTIME_93, "SIG93", "Real-time event 93") +ANY (TARGET_SIGNAL_REALTIME_94, "SIG94", "Real-time event 94") +ANY (TARGET_SIGNAL_REALTIME_95, "SIG95", "Real-time event 95") +ANY (TARGET_SIGNAL_REALTIME_96, "SIG96", "Real-time event 96") +ANY (TARGET_SIGNAL_REALTIME_97, "SIG97", "Real-time event 97") +ANY (TARGET_SIGNAL_REALTIME_98, "SIG98", "Real-time event 98") +ANY (TARGET_SIGNAL_REALTIME_99, "SIG99", "Real-time event 99") +ANY (TARGET_SIGNAL_REALTIME_100, "SIG100", "Real-time event 100") +ANY (TARGET_SIGNAL_REALTIME_101, "SIG101", "Real-time event 101") +ANY (TARGET_SIGNAL_REALTIME_102, "SIG102", "Real-time event 102") +ANY (TARGET_SIGNAL_REALTIME_103, "SIG103", "Real-time event 103") +ANY (TARGET_SIGNAL_REALTIME_104, "SIG104", "Real-time event 104") +ANY (TARGET_SIGNAL_REALTIME_105, "SIG105", "Real-time event 105") +ANY (TARGET_SIGNAL_REALTIME_106, "SIG106", "Real-time event 106") +ANY (TARGET_SIGNAL_REALTIME_107, "SIG107", "Real-time event 107") +ANY (TARGET_SIGNAL_REALTIME_108, "SIG108", "Real-time event 108") +ANY (TARGET_SIGNAL_REALTIME_109, "SIG109", "Real-time event 109") +ANY (TARGET_SIGNAL_REALTIME_110, "SIG110", "Real-time event 110") +ANY (TARGET_SIGNAL_REALTIME_111, "SIG111", "Real-time event 111") +ANY (TARGET_SIGNAL_REALTIME_112, "SIG112", "Real-time event 112") +ANY (TARGET_SIGNAL_REALTIME_113, "SIG113", "Real-time event 113") +ANY (TARGET_SIGNAL_REALTIME_114, "SIG114", "Real-time event 114") +ANY (TARGET_SIGNAL_REALTIME_115, "SIG115", "Real-time event 115") +ANY (TARGET_SIGNAL_REALTIME_116, "SIG116", "Real-time event 116") +ANY (TARGET_SIGNAL_REALTIME_117, "SIG117", "Real-time event 117") +ANY (TARGET_SIGNAL_REALTIME_118, "SIG118", "Real-time event 118") +ANY (TARGET_SIGNAL_REALTIME_119, "SIG119", "Real-time event 119") +ANY (TARGET_SIGNAL_REALTIME_120, "SIG120", "Real-time event 120") +ANY (TARGET_SIGNAL_REALTIME_121, "SIG121", "Real-time event 121") +ANY (TARGET_SIGNAL_REALTIME_122, "SIG122", "Real-time event 122") +ANY (TARGET_SIGNAL_REALTIME_123, "SIG123", "Real-time event 123") +ANY (TARGET_SIGNAL_REALTIME_124, "SIG124", "Real-time event 124") +ANY (TARGET_SIGNAL_REALTIME_125, "SIG125", "Real-time event 125") +ANY (TARGET_SIGNAL_REALTIME_126, "SIG126", "Real-time event 126") +ANY (TARGET_SIGNAL_REALTIME_127, "SIG127", "Real-time event 127") + +ANY (TARGET_SIGNAL_INFO, "SIGINFO", "Information request") + +/* Some signal we don't know about. */ +ANY (TARGET_SIGNAL_UNKNOWN, NULL, "Unknown signal") + +/* Use whatever signal we use when one is not specifically specified + (for passing to proceed and so on). */ +ANY (TARGET_SIGNAL_DEFAULT, NULL, + "Internal error: printing TARGET_SIGNAL_DEFAULT") + +/* Mach exceptions. In versions of GDB before 5.2, these were just before + TARGET_SIGNAL_INFO if you were compiling on a Mach host (and missing + otherwise). */ +ANY (TARGET_EXC_BAD_ACCESS, "EXC_BAD_ACCESS", "Could not access memory") +ANY (TARGET_EXC_BAD_INSTRUCTION, "EXC_BAD_INSTRUCTION", + "Illegal instruction/operand") +ANY (TARGET_EXC_ARITHMETIC, "EXC_ARITHMETIC", "Arithmetic exception") +ANY (TARGET_EXC_EMULATION, "EXC_EMULATION", "Emulation instruction") +ANY (TARGET_EXC_SOFTWARE, "EXC_SOFTWARE", "Software generated exception") +ANY (TARGET_EXC_BREAKPOINT, "EXC_BREAKPOINT", "Breakpoint") + +/* If you are adding a new signal, add it just above this comment. */ + +/* Last and unused enum value, for sizing arrays, etc. */ +ANY (TARGET_SIGNAL_LAST, NULL, "TARGET_SIGNAL_MAGIC") diff --git a/include/gdb/signals.h b/include/gdb/signals.h index a7eb19ce991..ce8c4ba1677 100644 --- a/include/gdb/signals.h +++ b/include/gdb/signals.h @@ -51,185 +51,13 @@ enum target_signal { - /* Used some places (e.g. stop_signal) to record the concept that - there is no signal. */ - TARGET_SIGNAL_0 = 0, - TARGET_SIGNAL_FIRST = 0, - TARGET_SIGNAL_HUP = 1, - TARGET_SIGNAL_INT = 2, - TARGET_SIGNAL_QUIT = 3, - TARGET_SIGNAL_ILL = 4, - TARGET_SIGNAL_TRAP = 5, - TARGET_SIGNAL_ABRT = 6, - TARGET_SIGNAL_EMT = 7, - TARGET_SIGNAL_FPE = 8, - TARGET_SIGNAL_KILL = 9, - TARGET_SIGNAL_BUS = 10, - TARGET_SIGNAL_SEGV = 11, - TARGET_SIGNAL_SYS = 12, - TARGET_SIGNAL_PIPE = 13, - TARGET_SIGNAL_ALRM = 14, - TARGET_SIGNAL_TERM = 15, - TARGET_SIGNAL_URG = 16, - TARGET_SIGNAL_STOP = 17, - TARGET_SIGNAL_TSTP = 18, - TARGET_SIGNAL_CONT = 19, - TARGET_SIGNAL_CHLD = 20, - TARGET_SIGNAL_TTIN = 21, - TARGET_SIGNAL_TTOU = 22, - TARGET_SIGNAL_IO = 23, - TARGET_SIGNAL_XCPU = 24, - TARGET_SIGNAL_XFSZ = 25, - TARGET_SIGNAL_VTALRM = 26, - TARGET_SIGNAL_PROF = 27, - TARGET_SIGNAL_WINCH = 28, - TARGET_SIGNAL_LOST = 29, - TARGET_SIGNAL_USR1 = 30, - TARGET_SIGNAL_USR2 = 31, - TARGET_SIGNAL_PWR = 32, - /* Similar to SIGIO. Perhaps they should have the same number. */ - TARGET_SIGNAL_POLL = 33, - TARGET_SIGNAL_WIND = 34, - TARGET_SIGNAL_PHONE = 35, - TARGET_SIGNAL_WAITING = 36, - TARGET_SIGNAL_LWP = 37, - TARGET_SIGNAL_DANGER = 38, - TARGET_SIGNAL_GRANT = 39, - TARGET_SIGNAL_RETRACT = 40, - TARGET_SIGNAL_MSG = 41, - TARGET_SIGNAL_SOUND = 42, - TARGET_SIGNAL_SAK = 43, - TARGET_SIGNAL_PRIO = 44, - TARGET_SIGNAL_REALTIME_33 = 45, - TARGET_SIGNAL_REALTIME_34 = 46, - TARGET_SIGNAL_REALTIME_35 = 47, - TARGET_SIGNAL_REALTIME_36 = 48, - TARGET_SIGNAL_REALTIME_37 = 49, - TARGET_SIGNAL_REALTIME_38 = 50, - TARGET_SIGNAL_REALTIME_39 = 51, - TARGET_SIGNAL_REALTIME_40 = 52, - TARGET_SIGNAL_REALTIME_41 = 53, - TARGET_SIGNAL_REALTIME_42 = 54, - TARGET_SIGNAL_REALTIME_43 = 55, - TARGET_SIGNAL_REALTIME_44 = 56, - TARGET_SIGNAL_REALTIME_45 = 57, - TARGET_SIGNAL_REALTIME_46 = 58, - TARGET_SIGNAL_REALTIME_47 = 59, - TARGET_SIGNAL_REALTIME_48 = 60, - TARGET_SIGNAL_REALTIME_49 = 61, - TARGET_SIGNAL_REALTIME_50 = 62, - TARGET_SIGNAL_REALTIME_51 = 63, - TARGET_SIGNAL_REALTIME_52 = 64, - TARGET_SIGNAL_REALTIME_53 = 65, - TARGET_SIGNAL_REALTIME_54 = 66, - TARGET_SIGNAL_REALTIME_55 = 67, - TARGET_SIGNAL_REALTIME_56 = 68, - TARGET_SIGNAL_REALTIME_57 = 69, - TARGET_SIGNAL_REALTIME_58 = 70, - TARGET_SIGNAL_REALTIME_59 = 71, - TARGET_SIGNAL_REALTIME_60 = 72, - TARGET_SIGNAL_REALTIME_61 = 73, - TARGET_SIGNAL_REALTIME_62 = 74, - TARGET_SIGNAL_REALTIME_63 = 75, - - /* Used internally by Solaris threads. See signal(5) on Solaris. */ - TARGET_SIGNAL_CANCEL = 76, - - /* Yes, this pains me, too. But LynxOS didn't have SIG32, and now - GNU/Linux does, and we can't disturb the numbering, since it's - part of the remote protocol. Note that in some GDB's - TARGET_SIGNAL_REALTIME_32 is number 76. */ - TARGET_SIGNAL_REALTIME_32, - /* Yet another pain, IRIX 6 has SIG64. */ - TARGET_SIGNAL_REALTIME_64, - /* Yet another pain, GNU/Linux MIPS might go up to 128. */ - TARGET_SIGNAL_REALTIME_65, - TARGET_SIGNAL_REALTIME_66, - TARGET_SIGNAL_REALTIME_67, - TARGET_SIGNAL_REALTIME_68, - TARGET_SIGNAL_REALTIME_69, - TARGET_SIGNAL_REALTIME_70, - TARGET_SIGNAL_REALTIME_71, - TARGET_SIGNAL_REALTIME_72, - TARGET_SIGNAL_REALTIME_73, - TARGET_SIGNAL_REALTIME_74, - TARGET_SIGNAL_REALTIME_75, - TARGET_SIGNAL_REALTIME_76, - TARGET_SIGNAL_REALTIME_77, - TARGET_SIGNAL_REALTIME_78, - TARGET_SIGNAL_REALTIME_79, - TARGET_SIGNAL_REALTIME_80, - TARGET_SIGNAL_REALTIME_81, - TARGET_SIGNAL_REALTIME_82, - TARGET_SIGNAL_REALTIME_83, - TARGET_SIGNAL_REALTIME_84, - TARGET_SIGNAL_REALTIME_85, - TARGET_SIGNAL_REALTIME_86, - TARGET_SIGNAL_REALTIME_87, - TARGET_SIGNAL_REALTIME_88, - TARGET_SIGNAL_REALTIME_89, - TARGET_SIGNAL_REALTIME_90, - TARGET_SIGNAL_REALTIME_91, - TARGET_SIGNAL_REALTIME_92, - TARGET_SIGNAL_REALTIME_93, - TARGET_SIGNAL_REALTIME_94, - TARGET_SIGNAL_REALTIME_95, - TARGET_SIGNAL_REALTIME_96, - TARGET_SIGNAL_REALTIME_97, - TARGET_SIGNAL_REALTIME_98, - TARGET_SIGNAL_REALTIME_99, - TARGET_SIGNAL_REALTIME_100, - TARGET_SIGNAL_REALTIME_101, - TARGET_SIGNAL_REALTIME_102, - TARGET_SIGNAL_REALTIME_103, - TARGET_SIGNAL_REALTIME_104, - TARGET_SIGNAL_REALTIME_105, - TARGET_SIGNAL_REALTIME_106, - TARGET_SIGNAL_REALTIME_107, - TARGET_SIGNAL_REALTIME_108, - TARGET_SIGNAL_REALTIME_109, - TARGET_SIGNAL_REALTIME_110, - TARGET_SIGNAL_REALTIME_111, - TARGET_SIGNAL_REALTIME_112, - TARGET_SIGNAL_REALTIME_113, - TARGET_SIGNAL_REALTIME_114, - TARGET_SIGNAL_REALTIME_115, - TARGET_SIGNAL_REALTIME_116, - TARGET_SIGNAL_REALTIME_117, - TARGET_SIGNAL_REALTIME_118, - TARGET_SIGNAL_REALTIME_119, - TARGET_SIGNAL_REALTIME_120, - TARGET_SIGNAL_REALTIME_121, - TARGET_SIGNAL_REALTIME_122, - TARGET_SIGNAL_REALTIME_123, - TARGET_SIGNAL_REALTIME_124, - TARGET_SIGNAL_REALTIME_125, - TARGET_SIGNAL_REALTIME_126, - TARGET_SIGNAL_REALTIME_127, - - TARGET_SIGNAL_INFO, - - /* Some signal we don't know about. */ - TARGET_SIGNAL_UNKNOWN, - - /* Use whatever signal we use when one is not specifically specified - (for passing to proceed and so on). */ - TARGET_SIGNAL_DEFAULT, - - /* Mach exceptions. In versions of GDB before 5.2, these were just before - TARGET_SIGNAL_INFO if you were compiling on a Mach host (and missing - otherwise). */ - TARGET_EXC_BAD_ACCESS, - TARGET_EXC_BAD_INSTRUCTION, - TARGET_EXC_ARITHMETIC, - TARGET_EXC_EMULATION, - TARGET_EXC_SOFTWARE, - TARGET_EXC_BREAKPOINT, - - /* If you are adding a new signal, add it just above this comment. */ - - /* Last and unused enum value, for sizing arrays, etc. */ - TARGET_SIGNAL_LAST +#define SET(symbol, constant, name, string) \ + symbol = constant, +#define ANY(symbol, name, string) \ + symbol, +#include "gdb/signals.def" +#undef ANY +#undef SET }; #endif /* #ifndef GDB_SIGNALS_H */