diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-05-10 15:10:36 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-05-10 15:10:36 +0000 |
commit | 447db2139a6f6883183a7a750c5849145fd29899 (patch) | |
tree | 116ab50e4e595e67ea93e7d19daef38aa3223bf4 /linux-user/signal.c | |
parent | 564c8f9978499a12fc8efd8d3c4af54060d1adcf (diff) |
sigtrap support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@147 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r-- | linux-user/signal.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index 9873071394..145dc29929 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -110,7 +110,8 @@ static inline void host_to_target_siginfo_noswap(target_siginfo_t *tinfo, tinfo->si_signo = sig; tinfo->si_errno = 0; tinfo->si_code = 0; - if (sig == SIGILL || sig == SIGFPE || sig == SIGSEGV || sig == SIGBUS) { + if (sig == SIGILL || sig == SIGFPE || sig == SIGSEGV || + sig == SIGBUS || sig == SIGTRAP) { /* should never come here, but who knows. The information for the target is irrelevant */ tinfo->_sifields._sigfault._addr = 0; @@ -131,7 +132,8 @@ static void tswap_siginfo(target_siginfo_t *tinfo, tinfo->si_signo = tswap32(sig); tinfo->si_errno = tswap32(info->si_errno); tinfo->si_code = tswap32(info->si_code); - if (sig == SIGILL || sig == SIGFPE || sig == SIGSEGV || sig == SIGBUS) { + if (sig == SIGILL || sig == SIGFPE || sig == SIGSEGV || + sig == SIGBUS || sig == SIGTRAP) { tinfo->_sifields._sigfault._addr = tswapl(info->_sifields._sigfault._addr); } else if (sig >= TARGET_SIGRTMIN) { @@ -788,6 +790,9 @@ long do_sigreturn(CPUX86State *env) sigset_t set; int eax, i; +#if defined(DEBUG_SIGNAL) + fprintf(stderr, "do_sigreturn\n"); +#endif /* set blocked signals */ target_set.sig[0] = frame->sc.oldmask; for(i = 1; i < TARGET_NSIG_WORDS; i++) |