Search code examples
macoscgdb

cgdb doesn't exit: determining why and fixing


After I run a program through cgdb, cgdb won't exit. Typing kill, then quit results in cgdb hanging.

If I do not load a file in the debugger, quit works. If I load a file but do not run it, quit works. If I run the file, quit hangs.

How do I:

  • Determine why this is happening? I can't look at the return value of cgdb (because I have to ps aux ; kill it, or close the terminal window, etc). I can't find any references to other people with this issue online, either.
  • Fix it? Without knowing exactly what's going wrong, is there any super-cool-command I can run to force-kill the debugger on quit?

Further details:

  • Installed cgdb with macports. Running port upgrade outdated has not resolved this issue.
  • cgdb --version returns: CGDB 0.6.6
  • uname -a: Darwin Kernel Version 12.2.0
  • Using OS X 10.8.2.

Solution

  • Pretty sure this is fixed in cgdb-0.6.7. Here's the issue: https://github.com/cgdb/cgdb/issues/1

    Homebrew has the latest cgdb in it, or you could compile from source.