Occasionally I find myself accidentally triggering a GDB command that takes a long time to complete. An example would be setting a breakpoint using tab-completion on the symbol name. Hitting tab an extra time or two can sometimes trigger GDB listing ALL loaded symbols. Then I have to wait for a few minutes while that completes. Is there a way to interrupt the GDB command other than just killing the whole debugging session?
Asked
Active
Viewed 339 times
1 Answers
0
Hitting CTRL-C in gdb should interrupt the last (time consuming) command issued. See this article on Debugging with gdb for more info.

Michael Goldshteyn
- 71,784
- 24
- 131
- 181
-
2GDB is *supposed* to stop on Ctrl-C, but there are bugs. http://www.cygwin.com/ml/gdb-patches/2011-07/msg00331.html – Employed Russian Oct 26 '11 at 19:59
-
1Yeah, it sounds like listing ALL symbols is one of these edge cases where GDB is not responsive. – Skeets Oct 26 '11 at 20:35