Subject: bug#5145: 23.1.50; GDB/CPU-Usage spikes

From: Chong Yidong <[email-masked]>
Date: Sat, 12 Dec 2009 11:41:38 -0500

> emacs -Q
>
> Compile the following program with gcc -g test.c -o test
>
> ,----[ test.c ]
> | 
> | int main(int argc, char **args)
> | {
> |   return 0;
> | }
> `----
>
> Run the debugger with M-x gdb RET RET, and type run in the GDB-Buffer.
>
> Emacs starts to use 100% cpu for me, although the program has stopped.
> Also, the Modeline says Debugger:run [unknown]

I can reproduce this.

The problem seems to go away if I revert the following change.  Nick,
could you take a look?  Thanks.

2009-08-30  Nick Roberts  <[email-masked]>

  * process.c (wait_reading_process_output): Keep the descriptor
  when pty is used by a non-child process, e.g., in I/O buffer of
  GDB this allows inferior to be restarted.