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. Cross plateform debugging
QtWS25 Last Chance

Cross plateform debugging

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.3k 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.
  • J Offline
    J Offline
    Jignesh Patel
    wrote on 30 Apr 2018, 08:59 last edited by Jignesh Patel
    #1

    hi,
    I have development board installed debian and also Qt library(qt version 5.3.2).
    My development platform is Ubuntu 16.04 LTS using qt creator 3.5.1 (based on Qt 5.5.1).
    Is it possible to debug application from desktop (remotely from qt creator) to board ?

    Thanks,
    Jignesh Patel

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 30 Apr 2018, 09:39 last edited by
      #2

      Yes, you need to set the device up in Tools->Options...->Devices->Add->Generic Linux Device.

      One you have that set up and working, debugger should work as well.

      (Z(:^

      1 Reply Last reply
      4
      • J Offline
        J Offline
        Jignesh Patel
        wrote on 2 May 2018, 07:51 last edited by
        #3

        Thanks for valuable input,

        I have try to do as per your step, but still can not remote debug my application.
        I have follow the step:

        1. Set up device from Tools->Options...->Devices->Add->Generic Linux Device and when i have test it following message get in windows.
          Connecting to host...
          Checking kernel version...
          Linux 4.1.15-224529-g1a2007a-dirty armv7l
          Checking if specified ports are available...
          All specified ports are available.
          Device test finished successfully.

        2. I have set up it in build and run, but here i don't have qmake for my cross platform. it used my development environment. I don't have cross compiler and qmake in my development environment.

        When I go for debug my application, My application stop after displaying following message on terminal.
        Debugging starts
        stdin: is not a tty
        Listening on port 10001
        Remote debugging from host 192.168.111.122

        After some time it gives the warning to stop debugging or give GDB more time.
        I have attached snapshot also for reference.

        0_1525247476564_Remote_debug.png

        Thanks

        1 Reply Last reply
        1
        • A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 2 May 2018, 08:00 last edited by
          #4

          @Jignesh-Patel

          Do you have gdbserver on your target board? If yes, which version?

          QtCreators debugger log (menu Window > Views > Debugger Log) may contain more information about what went wrong.

          Regards

          Qt has to stay free or it will die.

          J 1 Reply Last reply 2 May 2018, 11:22
          3
          • A aha_1980
            2 May 2018, 08:00

            @Jignesh-Patel

            Do you have gdbserver on your target board? If yes, which version?

            QtCreators debugger log (menu Window > Views > Debugger Log) may contain more information about what went wrong.

            Regards

            J Offline
            J Offline
            Jignesh Patel
            wrote on 2 May 2018, 11:22 last edited by
            #5

            Thanks @aha_1980 ,

            My GDB and Qt version is as per below:

            Board GDB version: GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
            PC GDB version : GNU gdbserver (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
            Board qt version : 5.3.2
            PC qt version : 5.5.1

            I have copy GDB debug log where it stop after "584-exec-continue" in wait.

            Response time: -file-exec-and-symbols "/home/jignesh/Desktop/QT/Time-zone/build-Sample_App-Device-Debug/Sample_App": 0.137 s
            16:35:59.379 [1ms]
            582target extended-remote tcp:192.168.111.119:10005
            16:35:59.379
            16:35:59.383 [4ms]
            &"target extended-remote tcp:192.168.111.119:10005\n"
            ~"Remote debugging using tcp:192.168.111.119:10005\n"
            16:35:59.386 [3ms]
            Remote debugging from host 192.168.111.122
            16:35:59.397 [11ms]
            582^done
            16:35:59.397
            Response time: target extended-remote tcp:192.168.111.119:10005: 0.019 s
            16:35:59.397
            ATTACHED TO GDB SERVER STARTED
            16:35:59.397
            Attached to stopped application
            16:35:59.398 [1ms]
            583-gdb-set remote exec-file
            16:35:59.398
            16:35:59.406 [8ms]
            583^done
            16:35:59.406
            Response time: -gdb-set remote exec-file : 0.009 s
            16:35:59.406
            Setting breakpoints...
            16:35:59.406
            Setting breakpoints...
            16:35:59.406
            ATTEMPT BREAKPOINT SYNCHRONIZATION
            16:35:59.406
            BREAKPOINTS ARE SYNCHRONIZED
            16:35:59.406
            NOTE: INFERIOR SETUP OK
            16:35:59.406
            State changed from InferiorSetupRequested(4) to InferiorSetupOk(6) [master]
            16:35:59.406
            State changed from InferiorSetupOk(6) to EngineRunRequested(7) [master]
            16:35:59.406
            QUEUE: RUN ENGINE
            16:35:59.406
            16:35:59.406
            CALL: RUN ENGINE
            16:35:59.406
            NOTE: ENGINE RUN AND INFERIOR STOP OK
            16:35:59.406
            Stopped.
            16:35:59.406
            State changed from EngineRunRequested(7) to InferiorStopOk(14) [master]
            16:35:59.407 [1ms]
            NOTE: INFERIOR RUN REQUESTED
            16:35:59.407
            Run requested...
            16:35:59.407
            State changed from InferiorStopOk(14) to InferiorRunRequested(10) [master]
            16:35:59.408 [1ms]
            Running requested...
            16:35:59.409 [1ms]
            584-exec-continue
            16:36:39.222 [39813ms]
            584: -exec-continue
            16:36:39.222
            TIMED OUT WAITING FOR GDB REPLY. COMMANDS STILL IN PROGRESS: "-exec-continue"

            why GDB doesn't get reponse here, GDB command line is new for me.
            How can i solve this issue?

            Thanks

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 2 May 2018, 14:08 last edited by
              #6

              @Jignesh-Patel said in Cross plateform debugging:

              Sorry, I have no other idea; but I'm currently not using the remote debugging feature.

              Board GDB version: GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
              PC GDB version : GNU gdbserver (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
              Board qt version : 5.3.2
              PC qt version : 5.5.1

              Are you sure this is all correct? You should have gdbserver on the board and GDB on your PC.

              That said, gdb 7.7.1 is quite old, the Qt versions you use also (but that should not matter for debugging in first place).

              If you like to create a bug report you should first try to update both gdb/gdbserver and QtCreator.

              Qt has to stay free or it will die.

              1 Reply Last reply
              0

              6/6

              2 May 2018, 14:08

              • Login

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