Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot step into Qt sources - Install Qt Debug Symbols with Web Installer?
QtWS25 Last Chance

Cannot step into Qt sources - Install Qt Debug Symbols with Web Installer?

Scheduled Pinned Locked Moved General and Desktop
11 Posts 4 Posters 7.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AndreasBuhr
    wrote on last edited by
    #1

    Hi there,

    I try to debug Qt and I'd like to step into the Qt sources, but it does not work. I only see assembly. I installed Qt 5.2.1 using the web installer and I also installed the sources using the web installer. I pointed QtCreate to the sources (in Tools->Options->Debugger), but still I am not able to step into Qt sources.

    Looking into the build configuration in Qt/5.2.1/gcc_64/mkspecs/qconfig.pri, I see that it is configure with "debug_and_release", so I think a debug build was generated.

    Am I missing something?
    Are the debug symbols installed by the web installer? How can I find out whether I do have the debug symbols installed?

    Any help is appreciated :-)

    best regards,
    Andreas

    1 Reply Last reply
    0
    • C Offline
      C Offline
      clochydd
      wrote on last edited by
      #2

      Hi Andreas,
      maybe a silly question, but are you building in Debug Mode?
      What is your system configuration?
      The debug symbols should have been installed by the web installer.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Also, what OS are you running Qt on ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AndreasBuhr
          wrote on last edited by
          #4

          Hi Clochydd,

          thanks for your help.
          Yes, I am building in debug mode. I can step through my code, but not Qt's.

          I am using Linux Mint 16, building for PC and Android, using Qt 5.2.1. I cannot step into Qt sources, no matter if I am debugging on android or PC.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            clochydd
            wrote on last edited by
            #5

            What is the Qt-code you like to see?
            Do you see the assembly code in general or only for special functions?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              AndreasBuhr
              wrote on last edited by
              #6

              I am investigating this bug:
              https://bugreports.qt-project.org/browse/QTBUG-38024

              And I would like to see the code in all levels of the callstack of my mousePressEvent handler to understand what is happening. So I would like to step into
              QGraphicsScene::event
              QApplication::notify
              QGraphicsView::mousePressEvent
              and the like.

              As said, I am on Linux Mint 16, using Qt 5.2.1, developing for PC and Android.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                andreyc
                wrote on last edited by
                #7

                You need to verify that you have debug version of Qt libraries.
                Run
                @
                file libQt5Widgets.so.5.2.1
                @

                if result contains a word "stripped" then the library does not have debug info.

                In this case you need to rebuild Qt libraries with
                @
                ./configure some_other_options -debug
                @

                see @./configure --help@ for more info

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  AndreasBuhr
                  wrote on last edited by
                  #8

                  Thanks a lot, that was one piece of the information I need. The PC shared objects are indeed stripped, so I do understand that problem now:
                  @
                  $ file Qt/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1
                  Qt/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xd01475f7c6e3e5bf736d8889f978404a3203caa5, stripped
                  @

                  For the Android case I am still confused. The shared object in the libs directory of the installation is not stripped:

                  @
                  $ file Qt/5.2.1/android_armv7/lib/libQt5Widgets.so.5.2.1
                  Qt/5.2.1/android_armv7/lib/libQt5Widgets.so.5.2.1: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
                  @

                  But the shared object in the build directory, which is used to build the package for android, is stripped. It seems the Qt tools strip away debug symbols during deployment?!

                  @
                  $ file qt_examples/build-sensors_test-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/libs/armeabi-v7a/libQt5Widgets.so
                  qt_examples/build-sensors_test-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/libs/armeabi-v7a/libQt5Widgets.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked (uses shared libs), stripped
                  @

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andreyc
                    wrote on last edited by
                    #9

                    Yep, I'm sure it is stripped during deployment because of a size difference.
                    libQt5Widgets.so is 6.5 Mb stripped library and 75 Mb is not-stripped.

                    Try to copy non-stripped library on top of installed if you have enough space on Android.

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      AndreasBuhr
                      wrote on last edited by
                      #10

                      Great, thanks a lot for your help.
                      Most of the time I'd like to debug on my PC, only when the phone act different to my PC I'd like to really debug on the phone.
                      The shared objects for the PC installed by the web installer are stripped, so no debugging is possible. Is there a way to get libs with debug information using the web installer? In the installer there is no option to install debug symbols, but it has some options to add repositories, but I was not able to find any information on what repositories you can add there.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        andreyc
                        wrote on last edited by
                        #11

                        I'm not sure if installer provides the debug versions.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved