Search code examples
qtgdbqt-creatorgnome-terminalgdbserver

How to terminate gdbserver when using GDB inside Qt Creator?


I have a quite similar question than the one done in this SO question, but with a small difference: I'm running GDB from within Qt Creator, not calling it from a terminal, so there is no terminal directly available to execute commands such as monitor exit or else to make gdbserver`stop running.

And there is one more problem: once I call the command for gdbserver to start listening to a port (and this is done via Minicom), I simply loose any command over Minicom or my target device! It doesn't matter what I type (ps, quit, kill ..., Ctr+C, etc.), nothing is accepted as command in Minicom once the command to start gdbserver is called.

So having this particular problems/situations, how can I terminate gdbserver when it's listening?


Solution

  • In QtCreator, if you click on Window -> Views -> Debugger Log you can access the gdb console. From there, using the left pane of the panel being shown, you can send commands to gdb and read output on the right pane. I assume that you can also issue a monitor exit to make gdbserver stop running.

    Anyway, in normal conditions, gdbserver is automatically terminated as soon as you stop debugging in QtCreator (at least on my PC it works like that).