Not to mention that SIGVTALRM is already used by the thread library (although I would hope that _thread_sys_sigaction is smart enough to handle that case). I've stepped through the GDB code on both 4.18 and 5.1. On 5.1 I found the following in i386fbsd-nat.c:
void child_resume (ptid_t ptid, int step, enum target_signal signal) { pid_t pid = ptid_get_pid (ptid); int request = PT_STEP; if (pid == -1) /* Resume all threads. This only gets used in the non-threaded case, where "resume all threads" and "resume inferior_ptid" are the same. */ pid = ptid_get_pid (inferior_ptid); if (!step) { unsigned int eflags; /* Workaround for a bug in FreeBSD. Make sure that the trace flag is off when doing a continue. There is a code path through the kernel which leaves the flag set when it should have been cleared. If a process has a signal pending (such as SIGALRM) and we do a PT_STEP, the process never really has a chance to run because the kernel needs to notify the debugger that a signal is being sent. Therefore, the process never goes through the kernel's trap() function which would normally clear it. */ eflags = read_register (PS_REGNUM); if (eflags & 0x0100) write_register (PS_REGNUM, eflags & ~0x0100); request = PT_CONTINUE; } It is pretty clear that: a) this does not deal with the case of step or next b) this does not work in the case of continue often times because step will be set to 1 and hence, this code does _not_ work around the bug. This appears to be less of a GDB bug and more of a kernel bug in ptrace. -Kip --- Donald Gillies <[EMAIL PROTECTED]> wrote: > I think this bug may be associated only with the > SIGALRM signal. When I > convert my code to use SIGVTALRM, the problem goes > away. Unfortunately, > SIGVTALRM does not do exactly > what I am looking for !! > > # gdb 5.10 > # $FreeBSD: src/COPYRIGHT,v 1.4 1999/09/05 21:33:47 > obrien Exp $ > # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 > > > __________________________________________________ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message