Qt Creator 3.6.1 Debugger doesn't work in CentOS 6.5
-
In Debug mode, it showed in application output
Debugging has started
Debugging has failed
Debugging has finishedIn Release mode , it showed warning as below:
" This does seem to be a "Debug" build.
Setting breakpoints by file name and line number may fail.Section .debug_info: Not_found
Section .debug_abbrev: Not found.
Section .debug_line: Not found.
Section .debug_str: Not found.
Section .debug_loc: Not found.
Section .debug_range: Not found.
Section .gdb_index: Not found.
Section .note.gnu.build-id: Found.
Section .gnu.hash: Found.
Section .gnu_debuglink: Not found."
My gcc 4.4.7
gdb 7.2-60.el6_4.1.
I spent time to look up the instructions on Google but it doesn't help at all. -
Hi and welcome
You should provide Qt version , where u download it, your platform
etc. -
Hi and welcome to devnet,
Is it a qmake project ? Or a cmake one ?
-
I found the answer at this link:
http://blog.hostilefork.com/qtcreator-debugger-no-locals-ubuntu/.
Problem is solved. -
Great ! Thanks for sharing :)
-
The posted link points to a fairly bad summary (even at the time of when the blog was written) of "The problem". "The problem" is that Qt Creator uses Python scripting inside GDB (and LLDB for that matter) extensively, and GDB 7.2's level of support for this is not sufficient.
This requirement is explicit in the official documentation. http://doc.qt.io/qtcreator/creator-debugger-engines.html says: "Starting with version 3.1, Qt Creator requires the Python scripting extension. GDB builds without Python scripting are not supported anymore and will not work. The minimum supported version is GDB 7.5 using Python version 2.7, or 3.3, or newer."
http://doc.qt.io/qtcreator/creator-debugger-engines.html.So CentOS 6.5's GDB 7.2 won't work with Qt Creator 3.6.
However, it is straightforward to compile any less ancient version of GDB (current is 7.11) with adequate Python support from source, starting with https://www.gnu.org/software/gdb/download/ and the usual configure, make. This also works for normal users without root privileges.