Debugging Helpers not working in Qt Creator 2.2 on Slackware Linux
-
Sorry, I am no expert on the debugger stuff. No idea what is going wrong there:-/
-
[quote author="Duck" date="1306520620"]You can override the gdb location by using the environment variable QTC_DEBUGGER_PATH=/path/to/your/gdb [/quote]
Thanks for the tip but problem now is that the gdb that came with QtCreator 2.2 is not working with my executables and it is giving me error: "not in executable format: File format not recognized."
I have searched on google and I have learned that this error may occur if 32 bit version of gdb is used with 64 bit excutables but I have checked that the gdb that came with QtCreator is infact 64 bit, So I am totally clueless about how to resolve this problem ????
-
[quote author="FrazAli" date="1306491722"]
My Setup:root@SA:/# uname -a
Linux SA 2.6.37.6 #3 SMP Sat Apr 9 22:49:32 CDT 2011 ×86_64 Intel® Core™ i5-2500 CPU @ 3.30GHz GenuineIntel GNU/Linux
[/quote]I have 64 bit Slacware Linux OS. I downloaded 64 bit version of Qt Creator with Qt SDK (approx 700 MB) from here http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_offline_v1_1_1_en.run
The gdb exe came with the package and it was in /QtSDK/pythongdb/gdb and I think it is 64 bit version according to the info. displayed if I run it from command line.
The target platform is also 64 bit. The confusing thing is that the gdb that came with my Salckware distribution supports my executables but it lacks python scripting which I believe is required to enable Debug helpers in Qt Creator.
-
The debug Log can be downloaded here: http://www.box.net/shared/8eo7f8elck
Output of "file myexe":
@root@SA:/home/SeedScan/SeedScanner# file SeedScanner
SeedScanner: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped@Output of "gdb exe"
@root@SA:/home/SeedScan/SeedScanner# file /opt/QtSDK/pythongdb/gdb
/opt/QtSDK/pythongdb/gdb: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), stripped@Output of "ldd myexe":
@root@SA:/home/SeedScan/SeedScanner# ldd SeedScanner
linux-vdso.so.1 => (0x00007fff1d93d000) libQtGui.so.4 => /opt/QtSDK/Desktop/Qt/473/gcc/lib/libQtGui.so.4 (0x00007ff29f191000) libQtCore.so.4 => /opt/QtSDK/Desktop/Qt/473/gcc/lib/libQtCore.so.4 (0x00007ff29ecbb000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff29ea74000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ff29e770000) libm.so.6 => /lib64/libm.so.6 (0x00007ff29e4ea000) libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007ff29e2d5000) libc.so.6 => /lib64/libc.so.6 (0x00007ff29df2f000) libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007ff29dd2a000) librt.so.1 => /lib64/librt.so.1 (0x00007ff29db21000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007ff29d80a000) libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00007ff29d5e3000) libz.so.1 => /usr/lib64/libz.so.1 (0x00007ff29d3cd000) libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ff29d145000) libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007ff29cef5000) libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007ff29ccee000) libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007ff29cad3000) libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007ff29c8c8000) libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007ff29c694000) libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007ff29c482000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007ff29c141000) libdl.so.2 => /lib64/libdl.so.2 (0x00007ff29bf3d000) /lib64/ld-linux-x86-64.so.2 (0x00007ff29ff1f000) libuuid.so.1 => /lib64/libuuid.so.1 (0x00007ff29bd39000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007ff29bb1d000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007ff29b91a000) libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007ff29b714000) libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007ff29b4eb000)@
Also if I execute this gdb with my exe from command line I get the same error:
@root@SA:/home/SeedScan/SeedScanner# /opt/QtSDK/pythongdb/gdb SeedScanner
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-none-linux-gnueabi".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
"/home/SeedScan/SeedScanner/SeedScanner": not in executable format: File format not recognized@I appreciate your help :)
-
From the log: 'This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-none-linux-gnueabi"'
This gdb build is meant to debug executables that are build for embedded Linux on ARM processor. Your binary is a "normal" desktop build for Intel(-ish) processors.
You need to use a gdb build that's with a target matching your binary.
-
Well I believe there is no easy solution for this. In order to get gdb with python support I have to build it from source and it requires python-devel package. Slackware currently supports python 2.6.6 and I suspect building gdb will further complicate things for me if I do not use correct version of python to build it. So I have decided to install a previous version of Qt Creator that does not require python enabled gdb. I'll wait until a solution for this problem appears. Thanks for all the help. You guys are amazing :)
-
Just wanted to update that I installed Qt Creator 2.1.0. by building it from source according to: http://slackbuilds.org/repository/13.37/development/qt-creator/
I had to rebuild debugging helpers in project settings. Now gdb is working fine and I can see Qobjects such as Qstring values in Debug mode. I hope it helps someone in similar situation.