Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-05-18 14:43:13 -0400
committerEugene Tarassov2013-05-18 14:43:13 -0400
commit962a045efe4176923cc4de502de06b80bbfc9cb8 (patch)
treec22572d375351b5461b8a4039963c92f083f599f /agent/system/Darwin/tcf/context-darwin.c
parent82093b818414ffc335b9ad95b846cde80b08b064 (diff)
downloadorg.eclipse.tcf.agent-962a045efe4176923cc4de502de06b80bbfc9cb8.tar.gz
org.eclipse.tcf.agent-962a045efe4176923cc4de502de06b80bbfc9cb8.tar.xz
org.eclipse.tcf.agent-962a045efe4176923cc4de502de06b80bbfc9cb8.zip
Bug 408257 - Signal framework does not support signal numbers beyond 32 (e.g real-time signals)
Diffstat (limited to 'agent/system/Darwin/tcf/context-darwin.c')
-rw-r--r--agent/system/Darwin/tcf/context-darwin.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/agent/system/Darwin/tcf/context-darwin.c b/agent/system/Darwin/tcf/context-darwin.c
index b3b13cf0..55fcf739 100644
--- a/agent/system/Darwin/tcf/context-darwin.c
+++ b/agent/system/Darwin/tcf/context-darwin.c
@@ -168,13 +168,13 @@ int context_continue(Context * ctx) {
if (skip_breakpoint(ctx, 0)) return 0;
if (!EXT(ctx)->syscall_enter) {
- while (ctx->pending_signals != 0) {
- while ((ctx->pending_signals & (1 << signal)) == 0) signal++;
- if (ctx->sig_dont_pass & (1 << signal)) {
- ctx->pending_signals &= ~(1 << signal);
- signal = 0;
+ unsigned n = 0;
+ while (sigset_get_next(&ctx->pending_signals, &n)) {
+ if (sigset_get(&ctx->sig_dont_pass, n)) {
+ sigset_set(&ctx->pending_signals, n, 0);
}
else {
+ signal = n;
break;
}
}
@@ -272,7 +272,7 @@ int context_resume(Context * ctx, int mode, ContextAddress range_start, ContextA
case RM_STEP_INTO:
return context_single_step(ctx);
case RM_TERMINATE:
- ctx->pending_signals |= 1 << SIGKILL;
+ sigset_set(&ctx->pending_signals, SIGKILL, 1);
return context_continue(ctx);
}
errno = ERR_UNSUPPORTED;
@@ -598,9 +598,8 @@ static void event_pid_stopped(pid_t pid, int signal, int event, int syscall) {
assert(!EXT(ctx)->attach_callback);
if (signal != SIGSTOP && signal != SIGTRAP) {
- assert(signal < 32);
- ctx->pending_signals |= 1 << signal;
- if ((ctx->sig_dont_stop & (1 << signal)) == 0) {
+ sigset_set(&ctx->pending_signals, signal, 1);
+ if (sigset_get(&ctx->sig_dont_stop, signal) == 0) {
ctx->pending_intercept = 1;
stopped_by_exception = 1;
}

Back to the top