1

QT Creator uses GDB from within the IDE to debug C++ code, and this is working fine. However, I'm unable to find any way of using GDB's reverse debugging functionality. Is this possible from within QT Creator? Searching the net reveals ambiguous, unsatisfactory results.

Using QT Creator 4.3.0 (same problem with 4.2.2) on Redhat Enterprise Linux 7.3.

  • Do you have access to GDB console? From there you can start a session recording for reverse debugging but you would need to type the reverse debugging commands as I am not 100% positive if the Qt Creator has that support.(Not a Qt Creator user) – AmeyaVS Jun 12 '17 at 07:37
  • @AmeyaVS Sorry if I was unclear but this question is specifically about GDB reverse debugging using QT Creator. –  Jun 12 '17 at 08:20
  • 1
    I have used Eclipse CDT which does provide access to GDB console for debugging and it works nearly flawlessly for scenarios such as reverse debugging etc. You can also refer here for more details on Qt Creator: https://stackoverflow.com/questions/4592643/accessing-gdb-console-in-qt-creator – AmeyaVS Jun 12 '17 at 08:36

1 Answers1

3

Following the link AmeyaVS provided, and reading up on the subject elsewhere, the process is:

  1. Start debugging in QT Creator as normal, stopping near the the code you wish to reverse debug (via a breakpoint etc).
  2. Enable the Window->Views->Debugger Log menu option.
  3. At the bottom of the left pane which appears, type record next to the command prompt.
  4. Continue debugging as normal using the QT Creator UI (or the command prompt).
  5. When you want to perform a reverse step (rs), reverse next (rn) , reverse continue (rc) etc command, just type it into the command prompt. The UI should reflect the results of these commands as usual.
Sergei Krivonos
  • 4,217
  • 3
  • 39
  • 54