Results 1 to 4 of 4

Thread: Qt Creator remote debugging in Linux

  1. #1
    Join Date
    Nov 2015
    Posts
    3
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Qt Creator remote debugging in Linux

    Hi All,

    I was using Qt 5.3.2 (http://download.qt.io/archive/qt/5.3...-x64-5.3.2.run). I never ran gdbserver on the target machine ( for remote debugging ). I tried running qt creator by opening a project, then tried to set break points and then debugged it by pressing F5. After debugging was finished the application was getting launched on the target and it was visible on the display. But when I tried with new version of Qt Creator 3.5 ( http://download.qt.io/official_relea...6_64-3.5.0.run), the problem I see is that debugging happens but nothing comes in the display. Though when I run ps command on the target I do see the output as follows:

    -----
    1379 root 5088 S sshd: root@notty
    1387 root 2980 S sh -c test -f /etc/profile && . /etc/profile;test -f $HOME/.profile && . $HOME/.profile; DISPLAY=':0.0' gdbserver --multi :10000
    1391 root 2248 S gdbserver --multi :10000
    1394 root 236m S /home/root/qtwidget
    1399 root 236m t /home/root/qtwidget
    1400 root 3004 R ps
    root@mx6q:~#
    ------

    The application which I am trying to debug is qtwidget. With Qt 5.3.2's Qt Creator below was output for command ps

    -----
    599 root 4932 R sshd: root@pts/0
    601 root 3060 S -sh
    609 root 5732 S sshd: root@notty
    623 root 2796 S sh -c test -f /etc/profile && . /etc/profile;test -f $HOME/.profile && . $HOME/.profile; DISPLAY=':0.0' gdbserver --once --multi :10000
    627 root 2144 S gdbserver --once --multi :10000
    628 root 223m S /home/root/qtwidget
    639 root 2812 R ps
    root@mx6q:~#
    ------

    When I run gdbserver on the target and try to connect it with Qt Creator mentioned as per the doc (http://doc.qt.io/qtcreator/creator-d...mote-debugging), it works fine with version 3.5. What I am not able to understand is:
    a) Is running gdbserver on the target, the right approach?
    b) Why it worked for Qt 5.3.2 version without running gdbserver?

    If anyone can help me understand it would be great help for me. By the way my kit is configured correctly to access target and deploy the application on the target. Let me know if more details required.

    Thanks,
    Sujith H

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Qt Creator remote debugging in Linux

    Both are launching gdbserver on your behalf. The second has added the --once option (which seems to conflict with the --multi option). See if the gdbserver options are configurable and try adding/removing the extra option.

  3. #3
    Join Date
    Nov 2015
    Posts
    3
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt Creator remote debugging in Linux

    Yah you are correct. Both are launching gdbserver on the target. The second one uses --once, but I found that it launches the application on the target and I am able to see the application displayed on the device. But with only --multi ( the first case ) that is not happening. I am wondering what could be the root cause for this? Or is it like we have to run gdbserver on the target and then connect to it using qt creator. Using this approach it all works fine. If I don't run gdbserver manually on the target, and allow Qt Creator to do it by itself, I cannot see application on the device. Let me know if more clarification is needed to understand the problem?

  4. #4
    Join Date
    Nov 2015
    Posts
    3
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt Creator remote debugging in Linux

    Is it a bug, that 2 process get spawned while trying to debug? When kill the process which is in the "t" state, the application gets displayed on the screen.

Similar Threads

  1. Remote debugging
    By dima in forum Qt Tools
    Replies: 0
    Last Post: 7th February 2013, 07:42
  2. QtCreator 2.6: remote Linux debugging issues
    By cybercloud in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th January 2013, 11:34
  3. Replies: 1
    Last Post: 17th September 2012, 06:08
  4. Replies: 0
    Last Post: 8th August 2012, 17:49
  5. Remote debugging with Qt Creator
    By rodrigotavares in forum Qt Tools
    Replies: 4
    Last Post: 3rd February 2010, 18:15

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.