Hi Dave,
I think we have an other small problem with sig :
crash> sig
PID: 14836 TASK: f7d89020 CPU: 1 COMMAND: "crash"
SIGPENDING: no
SIGNAL: 0000000000000000
BLOCKED: 0000000000000000
SIGNAL_STRUCT: c1e7ae00 COUNT: 1
SIG SIGACTION HANDLER MASK FLAGS [1] f5129804 817af58
0000000000000001 10000000 (SA_RESTART)
[...]
[63] f5129cdc SIG_DFL 0000000000000000 0 SIGQUEUE: (empty)
The last slot should be 64 ?
The patch is supposed to fix this problem.
I also indtroduce RT signals. I know this is trivial because the names
are SIGRTMIN+x (or SIGRTMAX-x). The motivation is the command sig -s.
By the way, there is a decision to enforce : do we leave the (null) to
remember that signals 32 and 33 don't exist (if i am correct) or do we
discard them ?
crash> sig -s ffffffffffffffff
SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGABRT SIGBUS SIGFPE SIGKILL SIGUSR1
SIGSEGV SIGUSR2 SIGPIPE SIGALRM SIGTERM SIGSTKFLT SIGCHLD SIGCONT SIGSTOP
SIGTSTP SIGTTIN SIGTTOU SIGURG SIGXCPU SIGXFSZ SIGVTALRM SIGPROF
SIGWINCH SIGIO
SIGPWR SIGSYS (null) (null) SIGRTMIN SIGRTMIN+1 SIGRTMIN+2 SIGRTMIN+3
SIGRTMIN+4
SIGRTMIN+5 SIGRTMIN+6 SIGRTMIN+7 SIGRTMIN+8 SIGRTMIN+9 SIGRTMIN+10 SIGRTMIN+11
SIGRTMIN+12 SIGRTMIN+13 SIGRTMIN+14 SIGRTMIN+15 SIGRTMAX-14 SIGRTMAX-13
SIGRTMAX-12 SIGRTMAX-11 SIGRTMAX-10 SIGRTMAX-9 SIGRTMAX-8 SIGRTMAX-7
SIGRTMAX-6
SIGRTMAX-5 SIGRTMAX-4 SIGRTMAX-3 SIGRTMAX-2 SIGRTMAX-1 SIGRTMAX
=================================================================
--- crash-4.0-3.2/task.c 2006-08-25 23:55:20.000000000 +0200
+++ crash-4.0-3.2-patch/task.c 2006-08-26 00:21:19.000000000 +0200
@@ -5522,7 +5522,6 @@
char *name;
char *altname;
} signame[_NSIG] = {
- /* 0 */ {NULL, NULL},
/* 1 */ {"SIGHUP", NULL},
/* 2 */ {"SIGINT", NULL},
/* 3 */ {"SIGQUIT", NULL},
@@ -5553,8 +5552,40 @@
/* 28 */ {"SIGWINCH", NULL},
/* 29 */ {"SIGIO", "SIGPOLL"},
/* 30 */ {"SIGPWR", NULL},
- /* 31 */ {"SIGSYS", NULL},
- {NULL, NULL}, /* Real time signals start here. */
+ /* 31 */ {"SIGSYS", "SIGUNUSED"},
+ /* 32 */ {NULL, NULL}, /* Real time signals start here. */
+ /* 33 */ {NULL, NULL},
+ /* 34 */ {"SIGRTMIN", NULL},
+ /* 35 */ {"SIGRTMIN+1", NULL},
+ /* 36 */ {"SIGRTMIN+2", NULL},
+ /* 37 */ {"SIGRTMIN+3", NULL},
+ /* 38 */ {"SIGRTMIN+4", NULL},
+ /* 39 */ {"SIGRTMIN+5", NULL},
+ /* 40 */ {"SIGRTMIN+6", NULL},
+ /* 41 */ {"SIGRTMIN+7", NULL},
+ /* 42 */ {"SIGRTMIN+8", NULL},
+ /* 43 */ {"SIGRTMIN+9", NULL},
+ /* 44 */ {"SIGRTMIN+10", NULL},
+ /* 45 */ {"SIGRTMIN+11", NULL},
+ /* 46 */ {"SIGRTMIN+12", NULL},
+ /* 47 */ {"SIGRTMIN+13", NULL},
+ /* 48 */ {"SIGRTMIN+14", NULL},
+ /* 49 */ {"SIGRTMIN+15", NULL},
+ /* 50 */ {"SIGRTMAX-14", NULL},
+ /* 51 */ {"SIGRTMAX-13", NULL},
+ /* 52 */ {"SIGRTMAX-12", NULL},
+ /* 53 */ {"SIGRTMAX-11", NULL},
+ /* 54 */ {"SIGRTMAX-10", NULL},
+ /* 55 */ {"SIGRTMAX-9", NULL},
+ /* 56 */ {"SIGRTMAX-8", NULL},
+ /* 57 */ {"SIGRTMAX-7", NULL},
+ /* 58 */ {"SIGRTMAX-6", NULL},
+ /* 59 */ {"SIGRTMAX-5", NULL},
+ /* 60 */ {"SIGRTMAX-4", NULL},
+ /* 61 */ {"SIGRTMAX-3", NULL},
+ /* 62 */ {"SIGRTMAX-2", NULL},
+ /* 63 */ {"SIGRTMAX-1", NULL},
+ /* 64 */ {"SIGRTMAX", NULL},
};
static void
@@ -5566,8 +5597,8 @@
if (!signame[i].name)
continue;
- fprintf(fp, "%s[%d] %s", i < 10 ? " " :
"", -
i, signame[i].name);
+ fprintf(fp, "%s[%d] %s", i+1 < 10 ? " " :
"", +
i+1, signame[i].name);
if (signame[i].altname)
fprintf(fp, "/%s", signame[i].altname);
fprintf(fp, "\n");
@@ -5591,12 +5622,12 @@
len = 0;
- for (i = c = 0; i < (_NSIG/2); i++) {
- mask = (ulong)(1) << i;
+ for (i = c = 0; i < (_NSIG); i++) {
+ mask = (ulonglong)(1) << i;
if ((sig = (sigset & mask))) {
- bit = ffs((int)sig);
+ /* bit = ffs((int)sig); */
sprintf(buf, "%s%s", c++ ? " " : "",
-
signame[bit].name);
+ signame[i].name);
if ((len + strlen(buf)) > 80) {
shift_string_left(buf, 1);
fprintf(fp, "\n");
@@ -5827,19 +5858,19 @@
} else
use_sighand = FALSE;
- for (i = 1; i < _NSIG; i++) {
- fprintf(fp, "%s[%d] ", i < 10 ? " " :
"", i);
+ for (i = 0; i < _NSIG; i++) {
+ fprintf(fp, "%s[%d] ", i+1 < 10 ? " " :
"", i+1);
if (use_sighand) {
kaddr = sighand_struct +
OFFSET(sighand_struct_action) +
- ((i-1) * SIZE(k_sigaction));
+ ((i) * SIZE(k_sigaction));
uaddr = signal_buf + OFFSET(sighand_struct_action) +
- ((i-1) * SIZE(k_sigaction));
+ ((i) * SIZE(k_sigaction));
} else {
kaddr = signal_struct + OFFSET(signal_struct_action) +
- ((i-1) * SIZE(k_sigaction));
+ ((i) * SIZE(k_sigaction));
uaddr = signal_buf + OFFSET(signal_struct_action) +
- ((i-1) * SIZE(k_sigaction));
+ ((i) * SIZE(k_sigaction));
}
handler = ULONG(uaddr + OFFSET(sigaction_sa_handler));
----------------------------------------------------------------
Ce message a ete envoye par IMP, grace a l'Universite Paris 10 Nanterre