PDA

View Full Version : Qt Creator: Not able to see value of QString etc even with python enabled gdb



ansmehta
15th July 2010, 09:11
Hi

I installed Qt SDK on Linux_x86_64. I'm using Qt Creator 2.0.0 present in it. I built a python enabled gdb 7.1.To confirm whether my gdb is python enabled I did :

~/gdb7.1build/gdb/gdb --interpreter=mi
~"GNU gdb (GDB) 7.1\n"
~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
~"This is free software: you are free to change and redistribute it.\n"
~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n"
~"and \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-unknown-linux-gnu\".\n"
~"For bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
(gdb)
-list-features
^done,features=["frozen-varobjs","pending-breakpoints","thread-info","python"]
(gdb)


Clearly I can see it is python enabled. I have python 2.4.3. My problem is that I can't see the values of QString etc. I have unchecked "Use debugging helpers" in Tools->options->debugger since I wan't to use python based debugging helpers and not the precompiled ones in qtc-debugging-helper. Do i need to add anything to my .gdbinit ? Currently i'm only looking to use python based debugging helpers of QString etc and don't wish to write my own debugging helpers of custom classes(will try this later)

NOTE: I get a warning in application output window &"warning: GDB: Failed to set controlling terminal: Invalid argument\n "
Do I need to rebuild Qt creator from sources after installing python enabled gdb or can I use directly the once present in SDK ??

ktk
21st July 2010, 22:56
The python helpers will be picked up automatically.

Except when you disable them with something like 'I have unchecked "Use debugging helpers" in Tools->options->debugger'

The warning is harmless.

ktk
21st July 2010, 23:00
Looking at it a second time: Python 2.4.x is probably the problem. Qt Creator requires Python 2.5 or 2.6. The debugger log (Windows->Views->Debugger) contains probably some hints.

lolli
20th September 2010, 08:05
I had same problem after update/installation that debugger didn't show e.g. content of QStrings. Environment is Qt Creator 2.0.0 for Windows. Problem was with the debugger helpers as said above:
Debugger properties/debugging helper/use debugger helper(check this one)