Question

Emacs usually use Ctrl+G to cancel the operation ,but when i use the GUD mode to debug a program ,the Ctrl+G is usually not working so well as i expected. For example, if i wanna to set a break point at the source test.cpp, line 223, if i input "b test.c:" ,then i use the TAB to auto complete it then will try to list all the possible result , then the emacs cannot respond to any input. if i use Ctrl+G to cancel this, the result continue to output all result to the screen, this may take a long time. is there a way to cancel this action more effectively?

Was it helpful?

Solution

Ctrl+G is for cancelling Emacs commands, but that output is coming from the debugger that's being run in the comint buffer. The Emacs command has already completed, it just sent the TAB to the debugger process.

Try Ctrl+C Ctrl+C, which sends an interrupt to the subprocess. However, it's possible that the subprocess has already finished sending the list of results, and it's all in the pty buffer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top