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. Gdb stops at "setting breakpoints" in QtCreator when debugging
Forum Updated to NodeBB v4.3 + New Features

Gdb stops at "setting breakpoints" in QtCreator when debugging

Scheduled Pinned Locked Moved Qt Creator and other tools
18 Posts 5 Posters 21.7k Views 1 Watching
  • 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
    Azpegath
    wrote on 19 Dec 2010, 22:18 last edited by
    #1

    For some reason I can't get gdb to work correctly with my QtCreator (v 2.0.94). I've read several threads on it, but there seems to be surprisingly little to be found!

    The only error/warning I'm seeing is:
    @Debugging starts
    &"warning: GDB: Failed to set controlling terminal: Invalid argument\n"@

    This led me to posts like "this":http://www.qtforum.org/article/31905/debugging-qt-application-on-linux.html, which hasn't helped me either.

    • I'm using Gentoo Linux, with Qt 4.7.1 and QtCreator 2.0.94
    • I'm running gdb 7.2 (and not 7.0 which has been said to have some problem with QtCreator).
    • I'm building debug builds (I have also made sure that "-g" is in the Makefile)
    • gdb can be started from the terminal
    • The path to gdb is set (/usr/bin/gdb) and it IS started, it just freezes at "setting breakpoints", and after 20 seconds I get a warning message saying "The gdb process has not responded to a command within 20 seconds. This could mean it is stuck in an endless loop or taking longer than expected to perform the operation. You can choose between waiting longer or abort debugging."
    • I rebuilt the Debug Helper, which then got a green check-mark next to it.

    My ldconfig.so.conf looks like
    @# ld.so.conf autogenerated by env-update; make all changes to

    contents of /etc/env.d directory

    /usr/local/lib
    include ld.so.conf.d/*.conf
    /usr/lib32/opengl/xorg-x11/lib
    /usr/lib64/opengl/xorg-x11/lib
    /lib
    /usr/lib
    /lib64
    /usr/lib64
    /usr/local/lib64
    /lib32
    /usr/lib32
    /usr/local/lib32
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/32
    //usr/lib64/xulrunner-1.9.2
    /usr/lib64/qca2
    /usr/lib/qt4
    /usr/lib64/qt4
    /usr/lib32/qt4
    /usr/lib64/sidplay/builders
    /usr/lib/sidplay/builders
    /opt/nvidia-cg-toolkit/lib
    /usr/games/lib
    /usr/games/lib64
    /usr/games/lib32
    /usr/lib32/libstdc++-v3/@

    In the Run Settings for the Project I have "Debugger C++" checked, but not the "Run in terminal" check-box. I'm not using QML, so I don't have that enabled either.

    If I need to supply more information, don't hesitate to ask! I have been trying to work around this problem for several months, but not being able to step through the code is just to painful...

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Azpegath
      wrote on 19 Dec 2010, 22:23 last edited by
      #2

      We have the same issue in these different forums, but there does not seem to be any good answers.

      • http://www.qtforum.org/article/34882/failed-to-set-controlling-terminal-invalid-argument-n.html
      • http://www.qtforum.org/article/31905/debugging-qt-application-on-linux.html
      • http://www.qtcentre.org/threads/26506-amp-quot-warning-GDB-Failed-to-set-controlling-terminal-Invalid-argument\n-quot
      • http://stackoverflow.com/questions/3869380/warning-gdb-failed-to-set-controlling-terminal-invalid-argument
      • http://ubuntuforums.org/showthread.php?t=1573799
      • http://www.qtcentre.org/threads/27725-GDB-Failed-to-set-controlling-terminal
      • http://www.qtcentre.org/threads/26506-amp-quot-warning-GDB-Failed-to-set-controlling-terminal-Invalid-argument\n-quot?p=160614#post160614
      • http://www.qtcentre.org/threads/32446-Qt-Creator-Not-able-to-see-value-of-QString-etc-even-with-python-enabled-gdb
      1 Reply Last reply
      0
      • A Offline
        A Offline
        Azpegath
        wrote on 19 Dec 2010, 22:25 last edited by
        #3

        This is some gdb info:

        @=thread-group-added,id="i1"
        ~"GNU gdb (Gentoo 7.2 p1) 7.2\n"
        ~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
        ~"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type "show copying"\nand "show warranty" for details.\n"
        ~"This GDB was configured as "x86_64-pc-linux-gnu".\nFor bug reporting instructions, please see:\n"
        ~"http://bugs.gentoo.org/.\n"
        (gdb)
        -list-features
        ^done,features=["frozen-varobjs","pending-breakpoints","thread-info","python"]
        (gdb)
        q
        &"q\n"@

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Azpegath
          wrote on 19 Dec 2010, 22:46 last edited by
          #4

          Here's a Debugger Log (right split): http://pastebin.com/aiEKyaTV
          And heres the Debugger commands (left split): http://pastebin.com/GwGcQuQj

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Azpegath
            wrote on 19 Dec 2010, 23:08 last edited by
            #5

            Now it suddenly works, without me doing any changes! This is very strange...

            This is the log for it: http://pastebin.com/yXQw4DJL
            and the left split: http://pastebin.com/Rb5j5wS9

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Azpegath
              wrote on 19 Dec 2010, 23:38 last edited by
              #6

              I'd say the behaviour is quite strange and erratic. If I stop at a breakpoint, the program crashes or gets locked up (for instance within a setScene or addText), but if I remove all breakpoints, it works.
              It behaves like it's very timing dependent, and one breakpoint in the beginning brakes it. The annoying thing is of course that it shouldn't be timing dependent, it's just a simple application with only one thread.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Azpegath
                wrote on 1 Jan 2011, 10:14 last edited by
                #7

                Hello? Anyone? This is still an issue...

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on 1 Jan 2011, 17:58 last edited by
                  #8

                  It's holiday time ... please wait for another couple of days.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    jjpap
                    wrote on 7 Jan 2011, 17:09 last edited by
                    #9

                    Hello,

                    I have the same problem...
                    I'm new on my fedora14 plateform and with Qt Creator 2.0.1 based on Qt 4.7.0 (64bits) and Gdb (7.2) I have this message in debug:

                    &"warning: GDB: Failed to set controlling terminal: Argument invalide\n"

                    and it not stop on my breaksPoints... :S

                    Any idea to solve this problem?

                    thx

                    jerome

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tobias.hunger
                      wrote on 8 Jan 2011, 10:33 last edited by
                      #10

                      The "controlling terminal" message can be ignored... nobody seems to know why gdb fails there (incl. the gdb developers):-(

                      From my experience most developers do not follow any forum. Bugreports and mailing lists are their way of communication. So please file a "bug report":http://bugreports.qt.nokia.com/ if you want to make sure the developers will be notified about the issue.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Azpegath
                        wrote on 18 Jan 2011, 18:40 last edited by
                        #11

                        Thanks, I was looking for a place to do that! I did however think that the devs followed the official forum.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          Azpegath
                          wrote on 21 Jan 2011, 09:33 last edited by
                          #12

                          I've posted a bug about it, and I have received an answer as well. Seems like it's fixed in the 2.1 branch, so either you can try to apply the patch yourself (it's mentioned in the bug) or wait for the new release. Let's cross our fingers and hope it works!

                          http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3534?focusedCommentId=138529#comment-138529

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            tobias.hunger
                            wrote on 21 Jan 2011, 11:31 last edited by
                            #13

                            Glad you got your issue fixed:-)

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              Azpegath
                              wrote on 23 Jan 2011, 11:20 last edited by
                              #14

                              I have tested the fix (just editing the dumper.py) and it seems to work a lot better now!

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                dimonomid
                                wrote on 27 Feb 2014, 11:17 last edited by
                                #15

                                I moved to Linux in 2014, and I'm facing the same issue. (on Windows it worked nice)

                                Linux Mint 13 (Ubuntu 12.04 derivative), Qt Creator 3.0.1, Qt 5.2.1, gdb 7.4-2012.04. Behavior exactly the same: stuck on 'Setting breakpoints...', and after 40 seconds the message:

                                The gdb process has not responded to a command within 40 second(s). This could mean it is stuck in an endless loop or taking longer than expected to perform the operation. You can choose between waiting longer or aborting debugging.

                                I tried to install latest gdb 7.7, I have set my Qt project to use it, but nothing is changed.

                                How to solve it now?

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  Azpegath
                                  wrote on 27 Feb 2014, 12:33 last edited by
                                  #16

                                  It's strange that this old bug would resurface... Perhaps it's a regression in QtCreator. I haven't used it in a while, so I haven't seen if the bug has come back.

                                  On another note, I would really recommend you to update to the latest version of Mint (if you're familiar with that and prefer it) since all dependencies are vastly updated on a modern version. Isn't it possible to do an upgrade to a newer version? Instead of a clean install I mean.

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    dimonomid
                                    wrote on 28 Feb 2014, 08:07 last edited by
                                    #17

                                    Thanks for the suggestion but I really want to stick to LTS release, so updating Mint is not an option for me.

                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      Azpegath
                                      wrote on 28 Feb 2014, 08:48 last edited by
                                      #18

                                      LTS is overrated :) But I digress!

                                      Perhaps you should either re-enable the bug to see if they can help you, or file a new bug and link to my old one.
                                      Good luck!

                                      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