When I want to close gdb, I frequently mistype


instead of


Whenever that happens, gdb hangs indeterminately, and I end up using kill -9 gdb_pid to terminate it.

I would like to ask:

  • why are the additional brackets () affecting the behaviour of gdb in this way?
  • is there a better approach to deal with this issue? e.g. redefine quit() as quit, a patch, simply learn why () are bad ...

Version of gdb is

  • 1
    What version of gdb? 8.0.1 on Arch Linux just tells me: A syntax error in expression, near `)'. – muru Nov 14 '17 at 10:36
  • @muru good to know that it has been fixed (: – Patrick Trentin Nov 14 '17 at 10:38
  • 1
    Possible confusion with call quit() to make a function call but those tend to require a call on them (I instead use control+d or EOF to exit gdb...) – thrig Nov 14 '17 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.