Fixed process.gdb-remote to be able to properly propagate the signals and

obey the UnixSignals table that we have in the process.

llvm-svn: 116139
This commit is contained in:
Greg Clayton
2010-10-09 01:40:57 +00:00
parent a2fabff4f6
commit 237cd90620
4 changed files with 50 additions and 38 deletions

View File

@@ -47,39 +47,41 @@ UnixSignals::Reset ()
// order, you can either subclass this class, and use Add & Remove to change them
// or you can subclass and build them afresh in your constructor;
m_signals.clear();
AddSignal(1, "SIGHUP", false, true, true ); // 1 hangup
AddSignal(2, "SIGINT", true, true, true ); // 2 interrupt
AddSignal(3, "SIGQUIT", false, true, true ); // 3 quit
AddSignal(4, "SIGILL", false, true, true ); // 4 illegal instruction (not reset when caught)
AddSignal(5, "SIGTRAP", true, true, true ); // 5 trace trap (not reset when caught)
AddSignal(6, "SIGABRT", false, true, true ); // 6 abort()
AddSignal(7, "SIGEMT", false, true, true ); // 7 pollable event ([XSR] generated, not supported)
AddSignal(8, "SIGFPE", false, true, true ); // 8 floating point exception
AddSignal(9, "SIGKILL", false, true, true ); // 9 kill (cannot be caught or ignored)
AddSignal(10, "SIGBUS", false, true, true ); // 10 bus error
AddSignal(11, "SIGSEGV", false, true, true ); // 11 segmentation violation
AddSignal(12, "SIGSYS", false, true, true ); // 12 bad argument to system call
AddSignal(13, "SIGPIPE", false, true, true ); // 13 write on a pipe with no one to read it
AddSignal(14, "SIGALRM", false, false, true ); // 14 alarm clock
AddSignal(15, "SIGTERM", false, true, true ); // 15 software termination signal from kill
AddSignal(16, "SIGURG", false, false, false); // 16 urgent condition on IO channel
AddSignal(17, "SIGSTOP", false, true, true ); // 17 sendable stop signal not from tty
AddSignal(18, "SIGTSTP", false, true, true ); // 18 stop signal from tty
AddSignal(19, "SIGCONT", false, true, true ); // 19 continue a stopped process
AddSignal(20, "SIGCHLD", false, false, true ); // 20 to parent on child stop or exit
AddSignal(21, "SIGTTIN", false, true, true ); // 21 to readers pgrp upon background tty read
AddSignal(22, "SIGTTOU", false, true, true ); // 22 like TTIN for output if (tp->t_local&LTOSTOP)
AddSignal(23, "SIGIO", false, false, false); // 23 input/output possible signal
AddSignal(24, "SIGXCPU", false, true, true ); // 24 exceeded CPU time limit
AddSignal(25, "SIGXFSZ", false, true, true ); // 25 exceeded file size limit
AddSignal(26, "SIGVTALRM", false, false, false); // 26 virtual time alarm
AddSignal(27, "SIGPROF", false, false, false); // 27 profiling time alarm
AddSignal(28, "SIGWINCH", false, false, false); // 28 window size changes
AddSignal(29, "SIGINFO", false, true, true ); // 29 information request
AddSignal(30, "SIGUSR1", false, true, true ); // 30 user defined signal 1
AddSignal(31, "SIGUSR2", false, true, true ); // 31 user defined signal 2
// SIGNO NAME SUPPRESS STOP NOTIFY
// ===== ============ ========= ====== ======
AddSignal(1, "SIGHUP", false, true, true ); // 1 hangup
AddSignal(2, "SIGINT", true, true, true ); // 2 interrupt
AddSignal(3, "SIGQUIT", false, true, true ); // 3 quit
AddSignal(4, "SIGILL", false, true, true ); // 4 illegal instruction (not reset when caught)
AddSignal(5, "SIGTRAP", true, true, true ); // 5 trace trap (not reset when caught)
AddSignal(6, "SIGABRT", false, true, true ); // 6 abort()
AddSignal(7, "SIGEMT", false, true, true ); // 7 pollable event ([XSR] generated, not supported)
AddSignal(8, "SIGFPE", false, true, true ); // 8 floating point exception
AddSignal(9, "SIGKILL", false, true, true ); // 9 kill (cannot be caught or ignored)
AddSignal(10, "SIGBUS", false, true, true ); // 10 bus error
AddSignal(11, "SIGSEGV", false, true, true ); // 11 segmentation violation
AddSignal(12, "SIGSYS", false, true, true ); // 12 bad argument to system call
AddSignal(13, "SIGPIPE", false, true, true ); // 13 write on a pipe with no one to read it
AddSignal(14, "SIGALRM", false, false, true ); // 14 alarm clock
AddSignal(15, "SIGTERM", false, true, true ); // 15 software termination signal from kill
AddSignal(16, "SIGURG", false, false, false); // 16 urgent condition on IO channel
AddSignal(17, "SIGSTOP", false, true, true ); // 17 sendable stop signal not from tty
AddSignal(18, "SIGTSTP", false, true, true ); // 18 stop signal from tty
AddSignal(19, "SIGCONT", false, true, true ); // 19 continue a stopped process
AddSignal(20, "SIGCHLD", false, false, true ); // 20 to parent on child stop or exit
AddSignal(21, "SIGTTIN", false, true, true ); // 21 to readers pgrp upon background tty read
AddSignal(22, "SIGTTOU", false, true, true ); // 22 like TTIN for output if (tp->t_local&LTOSTOP)
AddSignal(23, "SIGIO", false, false, false); // 23 input/output possible signal
AddSignal(24, "SIGXCPU", false, true, true ); // 24 exceeded CPU time limit
AddSignal(25, "SIGXFSZ", false, true, true ); // 25 exceeded file size limit
AddSignal(26, "SIGVTALRM", false, false, false); // 26 virtual time alarm
AddSignal(27, "SIGPROF", false, false, false); // 27 profiling time alarm
AddSignal(28, "SIGWINCH", false, false, false); // 28 window size changes
AddSignal(29, "SIGINFO", false, true, true ); // 29 information request
AddSignal(30, "SIGUSR1", false, true, true ); // 30 user defined signal 1
AddSignal(31, "SIGUSR2", false, true, true ); // 31 user defined signal 2
}
void
UnixSignals::AddSignal (int signo, const char *name, bool default_suppress, bool default_stop, bool default_notify)
{