emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdbui hang


From: Nick Roberts
Subject: gdbui hang
Date: Mon, 10 May 2004 18:41:03 +0100

 > [A related problem is that if I kill the *gud-foo* buffer to try and
 > recover from the hang, and then start another gdb process, it will often
 > fail to work, saying `selecting deleted buffer' in a command I give.  In
 > general it's a good idea to recover gracefully if a buffer is deleted;
 > the gdb mode probably shouldn't be keeping any session state outside of
 > the gdb buffer itself -- i.e., try to make any state variables
 > buffer-local in the gdb session buffer.]

This is because kill-buffer sends SIGHUP to the associated process. If GDB is
expecting input (as in the case you describe) then the process is immune to
SIGHUP and doesn't get killed.  Try this, even with the old GUD, type
list-buffers and you get something like:


Proc         Status   Buffer         Tty         Command
----         ------   ------         ---         -------
gud-myprog   run      (Killed)       /dev/pts/4  gdb -fullname /home/nick/myprog

Since the process is not killed, gud-sentinel doesn't get called and, in the
case of gdb-ui, the associated buffers stay there. To run gdb again requires
that these buffers (partial-output, breakpoints etc) are deleted first. 
"kill -9" will kill the GDB process but leave the inferior process.

Its messy, I agree, but I don't have an answer to this one. 

Does anybody else have a solution?

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]