Date: Mon, 29 Oct 2001 15:22:45 -0800 (PST) From: k Macy <kip_macy@yahoo.com> To: Ian Dowse <iedowse@maths.tcd.ie> Cc: freebsd-hackers@freebsd.org Subject: Re: problems with recurring SIGTRAP under gdb Message-ID: <20011029232245.12082.qmail@web14005.mail.yahoo.com> In-Reply-To: <200110291230.aa64062@salmon.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
SIGIO is used, but only for AIO and at this point no aio_* calls have been made. The loop for reading from STDIN may be a problem but I don't see how - this same loop is used without problems on Linux, OSF, and Solaris (although on Linux if you press Ctrl-C in gdb it often won't let you continue): int sim_getc(char *cp) { int r; sk_wait_for_fd(0); r = read(0, cp, 1); if (r <= 0) { dbg_printf("pccons_getchar: read failed: %s\n", error_msg()); sk_panic("pccons_getchar: failed read on stdin"); } return r; } sk_wait_for_fd is just: void sk_wait_for_fd(int fd) { int slot; sk_Msg *msg; if (sk_poll_one_fd(fd)>0) { /* fd is already ready */ return; } slot = sk_add_poll_fd(fd); if(slot < 0) return; do { msg = sk_receive(); if((msg->type == SK_SIGNAL_MSG) && (msg->data.l == HARD_SIG_00010)) break; } while (1); sk_remove_poll_fd(slot); } beneath this it just uses poll --- Ian Dowse <iedowse@maths.tcd.ie> wrote: > In message > <20011029023746.94559.qmail@web14001.mail.yahoo.com>, > k Macy writes: > >Any idea why when I insert a breakpoint I get a > >SIGTRAP > >and can't continue any further? Is this a bug in > the > > I've seen this on applications that use SIGIO on > stdin. If this is the > case, a workaround is to disable the SIGIO signal > while using the > debugger, e.g: > > (gdb) set $oldsigio = signal(23, (void *)1) > > The signal handler can be put back later with: > > call signal(23, (void *)$oldsigio) > > Ian __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011029232245.12082.qmail>