summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2002-01-10 11:49:55 +0000
committerbde <bde@FreeBSD.org>2002-01-10 11:49:55 +0000
commit4bc93bce9562a8b9fef41567055aa1f18006ced3 (patch)
tree7871d96b3c7a4dfee1d7378681c22b9b12eb2708 /sys/i386/linux/linux_sysvec.c
parentf267ba5cc73797843de3904ea9c79682ad9674ad (diff)
downloadFreeBSD-src-4bc93bce9562a8b9fef41567055aa1f18006ced3.zip
FreeBSD-src-4bc93bce9562a8b9fef41567055aa1f18006ced3.tar.gz
Clear the single-step flag for signal handlers. This fixes bogus trace
traps on the first instruction of signal handlers. In trap.c:syscall(), fake a trace trap if the single-step flag was set on entry to the kernel, not if it will be set on exit from the kernel. This fixes bogus trace traps after the last instruction of signal handlers. gdb-4.18 (the version in FreeBSD) still has problems with the program in the PR. These seem to be due to bugs in gdb and not in FreeBSD, and are fixed in gdb-5.1 (the distribution version). PR: 33262 Tested by: k Macy <kip_macy@yahoo.com> MFC after: 1 day
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r--sys/i386/linux/linux_sysvec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 0247c58..bddc42d 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -385,7 +385,7 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
regs->tf_esp = (int)fp;
regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode) +
linux_sznonrtsigcode;
- regs->tf_eflags &= ~PSL_VM;
+ regs->tf_eflags &= ~(PSL_T | PSL_VM);
regs->tf_cs = _ucodesel;
regs->tf_ds = _udatasel;
regs->tf_es = _udatasel;
@@ -519,7 +519,7 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
*/
regs->tf_esp = (int)fp;
regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode);
- regs->tf_eflags &= ~PSL_VM;
+ regs->tf_eflags &= ~(PSL_T | PSL_VM);
regs->tf_cs = _ucodesel;
regs->tf_ds = _udatasel;
regs->tf_es = _udatasel;
OpenPOWER on IntegriCloud