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. Qt Creator gdb hang on startup
Forum Updated to NodeBB v4.3 + New Features

Qt Creator gdb hang on startup

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
1 Posts 1 Posters 195 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.
  • P Offline
    P Offline
    paulf
    wrote on last edited by paulf
    #1

    I'm getting a hang when I try to run gdb. This is with Creator 4.15.2 installed locally from the qt.io installer. RHEL 7.6 and gdb 8.3.1

    I've seen a thread from about 5 years ago suggesting that I disable gdbinit, which does not help. Possibly related is the fact that the executable does set some auto-loads in .debug_gdb, one is no longer used and the other two are disabled because they aren't set up in .gdbinit.

    On the gdb side, pstack says that it is waiting in 'poll()'. On the Qt Creator side, in the Debugger Log I see (real names redacted)

    =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<MULTIPLE>",times="0",original-location=""source.c":237"},{number="1.1",enabled="y",addr="0x0000000002e4103c",func="function",file="/path/source.c",fullname="/path/source.c",line="266",thread-groups=["i1"]},{number="1.2",enabled="y",addr="0x0000000002e4103c",func="function",file="/path/source.c",fullname="/path/source.c",line="266",thread-groups=["i2"]}

    NON-CRITICAL TIMEOUT
    COMMANDS STILL IN PROGRESS:

    And it just sits there.

    Looking at the Creator source

    https://github.com/qt-creator/qt-creator/blob/20a63d6c7e080f52a5749bbc7a0997d4d5753f46/src/plugins/debugger/gdb/gdbengine.cpp

    the above log message is supposed to be printing the commands after the colon. So it looks like in my case there are no commands, just a timeout. Perhaps it would be better if the above output said something like "(none)" if the list of commands is empty.

    pstack on the qtcreator process seems to show everything waiting in poll or on mutexes.

    If I attach strace to qtcreator then try to start a gdb session then I see lots of write() and poll() syscalls as the exe and shared libs get loaded and the symbol tables are read.

    After that there are a load of madvise(). After that I don't see much that I can interpret, just read()/write()/poll() syscalls.

    Update: just upgraded to Qt Creator 5.0.0, same problem.

    After trying quite a few things. I've found that I can set a breakpoint on main and stop there. The hang occurs a bit later where the following is happening

    system("ldd exe | grep libfoo | awk 'some pretty print filter'").

    If I uncheck "Debug all child processes" then there is no hang.

    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