public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdb gets suspended during debugging
@ 2005-09-12  4:51 Craig Jeffree
  2005-09-12 12:39 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Craig Jeffree @ 2005-09-12  4:51 UTC (permalink / raw)
  To: gdb

Hi everyone,

I've discovered that GDB will get suspended/backgrounded when debugging
if it produces a terminal height worth of the "Detaching after fork from
child process..." messages.

This only occurs the first time the terminal fills up and you can simply
'fg' the debugger back to the foreground and it will continue without
any problems.  You can also work around it by doing 'set height 0' in
gdb as this prevents it from prompting when the terminal fills up.

I couldn't find any bugs regarding this in the database, only an
unanswered message in a mailing list somewhere.  Has anyone else seen
this before?  It is a bug isn't it?  Is there a better fix/workaround so
that I can keep my value for height untouched and not have to 'fg' the
debugger?

I've seen this with gdb 6.2 and 6.3, I compiled the example below with
gcc 3.2.3 and it occurs with both bash and tcsh.  I've only tested it
under RHEL3 & 4.

To see it for yourselves run this in GDB:
#include <unistd.h>

int main()
{
    while(1)
    {
        if (!fork())
            exit(1);

        sleep(1);
    }
}


Cheers,
Craig.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-12 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-12  4:51 gdb gets suspended during debugging Craig Jeffree
2005-09-12 12:39 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).