Windows DatabaseebooksStatistical Information

LLE10207 : Howto send debug commands to gdb when you are debugging with Qt creator

Symptom:

You would like to send a direct command to the gdb debugger

Cause:

none

Solution:

Qt Creator is a nice IDE for writing c++ application with Qt. It has integrated debugging features and works as a front end for gdb. Although you have nice views and can see your variables, there are times where you would like to fall back to the gdb command line. One possibility is to use gdb from the command line although it is not needed.
The integrated view of Qt Creator can send gdb commands directly to the debugger! The left pane of the debugger can be used to send these commands by using Ctrl-Enter. So you can just type in your gdb command line command

e.g.
backtrace

to view your stack. When you type in Ctrl-Enter, the right pane will show you the gdb result. This is a very nice (almost unknown) feature of Qt Creator which can make life easier. Especially when you are dealing with a program which has been killed by the OS because of an access violation.
If there our commands that need to be executed each time the debugger is started, you can use a text file and enter it under Tools -> Options -> Debugger. Here you can configure the Gdb startup script.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
Copyright © 2004-2011 Lubby (V3.0.10 Aug 2011)
Sponsored by Keskon.
Statistical information by Google Analytics