Results 1 to 4 of 4

Thread: How to debug into Qt library on Linux

  1. #1
    Join Date
    Dec 2009
    Posts
    47
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default How to debug into Qt library on Linux

    Hi all

    I need to debug into Qt libraries, so I installed the package libqt4-dbg. Libraries are available in /usr/lib/debug/usr/lib/ and subdirectories, including libQtCore.so.4.6.2 and libQtGui.so.4.6.2; I assume these are debug libraries with symbol tables.

    When I start to debug my application, execution stops at breakpoints in my code but I am unable to step with F11 into the library source code.

    Do I need to instruct QtCreator to link with the debug libraries and not the standard, non-debug Qt libraries? How?
    Do I need to let gdb know, where the libraries are? How?

    Al_

    System: Ubuntu lucid (10.04 LTS) with Qt version as standard for lucid, i.e., Qt 4.6.2 and QtCreator1.3.1

  2. #2
    Join Date
    May 2008
    Posts
    155
    Thanked 15 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to debug into Qt library on Linux

    Do the debug symbols match the Qt version you develop with?

    [Complete independent and unrelated: Qt Creator 1.3.1 is _really old_ by now]

  3. #3
    Join Date
    Dec 2009
    Posts
    47
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: How to debug into Qt library on Linux

    @ktk
    Yes, Qt version matches:
    /usr/bin$ qmake-qt4 -v
    QMake version 2.01a
    Using Qt version 4.6.2 in /usr/lib

    And the debug libraries in /usr/lib/debug/usr/lib have file names that end in ...so.4.6.2

    Yes, QtCreator 1.3.1 is old. To get a newer version i will either need to make a distro upgrade (away from the LTS version) or manually update Qt.

  4. #4
    Join Date
    Dec 2009
    Posts
    47
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: How to debug into Qt library on Linux

    I did some further searching, without success. What I found, however:
    • Unlike /usr/bin/qmake-qt4 the debug version was not executable (it is now; but did not help)
    • When I add in QtCreator to the setting 'Qt Versions' /usr/lib/debug/usr/bin/qmake-qt4 as additonal version, the dialog states that /usr/lib/debug/usr/bin/qmake-qt4 is no valid Qt installation (in German: 'keine gültige Qt-Installation').
    • The debug qmake-qt4 seems to erroneously use the Qt version in /usr/lib, i.e., the non-debug version:
      /usr/lib/debug/usr/bin$ qmake-qt4 -v
      QMake version 2.01a
      Using Qt version 4.6.2 in /usr/lib


    What am I doing wrong?

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 06:27
  2. qt 4.6.2 shared library using debug problem
    By soniaerm in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2010, 18:31
  3. Where is the debug webkit library?
    By mikemoretti in forum Installation and Deployment
    Replies: 0
    Last Post: 14th January 2010, 18:46
  4. how does Qt know the library path in LINUX
    By babu198649 in forum General Programming
    Replies: 1
    Last Post: 14th November 2008, 17:10
  5. QT Program debug,GDB on Linux
    By darpan in forum General Programming
    Replies: 1
    Last Post: 26th January 2007, 22:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.