From 4bc93bce9562a8b9fef41567055aa1f18006ced3 Mon Sep 17 00:00:00 2001 From: bde Date: Thu, 10 Jan 2002 11:49:55 +0000 Subject: 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 MFC after: 1 day --- sys/i386/svr4/svr4_machdep.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/i386/svr4') diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c index 9355772..42e565c 100644 --- a/sys/i386/svr4/svr4_machdep.c +++ b/sys/i386/svr4/svr4_machdep.c @@ -492,6 +492,7 @@ svr4_sendsig(catcher, sig, mask, code) #else tf->tf_esp = (int)fp; tf->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); + tf->tf_eflags &= ~PSL_T; tf->tf_cs = _ucodesel; tf->tf_ds = _udatasel; tf->tf_es = _udatasel; -- cgit v1.1