Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Debugger does not start. GDB not support Python scripting.
QtWS25 Last Chance

Debugger does not start. GDB not support Python scripting.

Scheduled Pinned Locked Moved Qt Creator and other tools
10 Posts 6 Posters 40.9k 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.
  • S Offline
    S Offline
    Sriep
    wrote on last edited by
    #1

    Hi

    I have just upgraded to Qt Creator 5.3
    When I try to run the debugger I get the message box
    "The selected build of GDB does not support Python scripting it cannot be used in Qt Creator"
    And no debugging happens.
    When I run the auto detected GDBs in Options | Build & Run I get below.

    (Ubuntu 14.04) I get the following results.
    $ gdb version
    GNU gdb (GDB) 7.7
    ...

    $ python --version
    Python 2.7.6
    ...

    Before I upgraded, debugging could happen, but local variable informatino was not very good.

    Thanks for anyhelp

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

      What does gdb says if you run python inside it.
      @
      (gdb) python print("Hello, world!")
      Hello, world!
      (gdb)
      @

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

        I guess you need to check python version. On Ubuntu 14.04 I have

        (gdb) python import sys; print (sys.version)
        3.4.0 (default, Apr 11 2014, 13:08:54)
        [GCC 4.8.2]
        (gdb)

        And I have both 2.7 and 3.4 python installed.

        $ python --version
        Python 2.7.6

        $ python3 --version
        Python 3.4.0

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sriep
          wrote on last edited by
          #4

          Ah!

          I get

          (gdb) python print("Hello world!")
          Python scripting is not supported in this copy of GDB.
          (gdb)

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

            The latest version of QtCreator does not support gdb without python, so you need to install Ubuntu package or build gdb with python support

            Here is how it looks like on Ubuntu 14.04
            @
            $ gdb --version
            GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
            @

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sriep
              wrote on last edited by
              #6

              Thanks, inspired by http://blog.hostilefork.com/qtcreator-debugger-no-locals-ubuntu/

              I dowloaded gdb 7.7.1 from http://ftp.gnu.org/gnu/gdb/

              I then run form gdb-7.7.1 directory(not sure whether configure options needed)

              ./configure --prefix /usr/local/gdb-python2 --with-python
              make
              make install

              I then created a new debugger link in Tools | Options | Build & Run, Debugger manual section pointing to /usr/local/gdb-python2/bin/gdb, and a new kit in Kits Manual section using that link.

              It seems to be able to debug now.

              P 1 Reply Last reply
              0
              • T Offline
                T Offline
                trousev
                wrote on last edited by
                #7

                For debian stretch users:

                sudo apt-get install gdb-python2
                
                1 Reply Last reply
                3
                • T Offline
                  T Offline
                  Taz Pierrafeu
                  wrote on last edited by
                  #8

                  Under Kubuntu 16.04 and Qt creator 4.4.1, uses udo apt-get install gdb python2.7-dbg

                  1 Reply Last reply
                  1
                  • B Offline
                    B Offline
                    borsch
                    wrote on last edited by borsch
                    #9

                    Check gdb packet, on my system (Kali Linux) by default was installed "gdb-minimal". Replase it by full "gdb" packet with include python support.

                    1 Reply Last reply
                    1
                    • S Sriep

                      Thanks, inspired by http://blog.hostilefork.com/qtcreator-debugger-no-locals-ubuntu/

                      I dowloaded gdb 7.7.1 from http://ftp.gnu.org/gnu/gdb/

                      I then run form gdb-7.7.1 directory(not sure whether configure options needed)

                      ./configure --prefix /usr/local/gdb-python2 --with-python
                      make
                      make install

                      I then created a new debugger link in Tools | Options | Build & Run, Debugger manual section pointing to /usr/local/gdb-python2/bin/gdb, and a new kit in Kits Manual section using that link.

                      It seems to be able to debug now.

                      P Offline
                      P Offline
                      PSM100
                      wrote on last edited by PSM100
                      #10

                      @Sriep I am using below configuration

                      Ubuntu 16 Qt 3.5.1 and I want to debug an application to raspberry pi from Host PC.

                      I am able to run the application in release mode to Rpi. I tried same solutions and able to install the gdb-7.7.1 and installed it and configuring it.. But I am still receiving the below errors.

                      Debugging starts
                      Listening on port 10005
                      Remote debugging from host 192.168.0.108
                      Process /home/pi/appchooser/build-appchooser-RaspberryPi-Debug/appchooser created; pid = 6518
                      Build ID mismatch between current exec-file /home/sruhad/QtSample/QtSample/build-appchooser-LocalPC-Debug/appchooser
                      and automatically determined exec-file loading /home/pi/appchooser/build-appchooser-RaspberryPi-Debug/appchooser /home/pi/appchooser/build-appchooser-RaspberryPi-Debug/appchooser: Not a directory.
                      while parsing target description (at line 10): Target description specified unknown architecture "arm"
                      Could not load XML target description; ignoring
                      Killing process(es): 6518
                      Debugging has finished

                      Debugging log:

                      &"warning: while parsing target description (at line 10): Target description specified unknown architecture "arm"\n"
                      while parsing target description (at line 10): Target description specified unknown architecture "arm"

                      &"warning: Could not load XML target description; ignoring\n"
                      Could not load XML target description; ignoring
                      208^error,msg="Remote 'g' packet reply is too long (expected 312 bytes, got 328 bytes): 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0fdff7e0000000030eafc76100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
                      dRemote 'g' packet reply is too long (expected 312 bytes, got 328 bytes): 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0fdff7e0000000030eafc76100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

                      I know its very old post. But any help would be appreciated.

                      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