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. Remote debugging, no hostname field in Qt Creator 2.7.1?
Forum Updated to NodeBB v4.3 + New Features

Remote debugging, no hostname field in Qt Creator 2.7.1?

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 4.8k 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.
  • G Offline
    G Offline
    georgesim
    wrote on last edited by
    #1

    I'm trying to remote debug a linux program from a Qt Creator 2.7.1 instance in a windows machine. I cross compiled GDB with "--host=i686-pc-mingw32 --target=i586-suse-linux" options and created a MinGW-remote Kit to use this specific GDB debugger. If I debug in a terminal with the cross-compiled GDB, everything works correctly. However, when trying to use Qt Creator, I go to "Debug -> Start Debugging -> Attach to remote debug server..." and while there is a Port field, there is no way to configure the hostname and the logger shows GDB doing "target remote tcp::<my-port>", failing after a timeout.

    How come there is no way to set a hostname in this dialog?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      The kit you select contains a device which in turn contains information on how to talk to that device.

      So to connect some device you have not yet used go to Tools>Options>Devices and add a new device. Then go to Tools>Options>Build & Run>Kits and set up a new kit that makes use of that device. Cloning an existing one and changing the device field most likely works best. Make sure to give a good name and maybe even set an icon for the new kit to make it easier to identify.

      Then go to Debug>Start Debugging>Attach to remote debug server... and select the new kit.

      The nice thing about this approach is that it is really fast to switch between different devices without having to reenter all the settings all the time (once the kits are set up that is;).

      1 Reply Last reply
      0
      • G Offline
        G Offline
        georgesim
        wrote on last edited by
        #3

        Thanks, that did it. Although I find it weird that using a 'generic linux device' requires a username and password. In my case I'm using gdbserver so I don't need to actually connect to the machine, so I just use a dummy username.

        Do you know if there's a way to tell Qt where to look for sources? Something similar to GDB's dir command? It seems the source path mapping entries in the Debug properties are not doing what I think they should. I have a source tree similar to:

        /project/binary
        /project/lib1
        /project/lib2
        /project/lib3

        If I were to debug something from within GDB, I would do:
        dir /project/binary:/project/lib1...
        set solib-search-path lib1:lib2:lib3

        But when I debug with Qt Creator, it can't find the sources unless I copy everything in a single directory and use that as the working directory, which is less than idea, to say the least.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          The user/password is needed to deploy your application via SSH.

          You can always enter raw gdb commands into the debugger log area:-) I am no expert on the debugger plugin, I can not really help with that. Sorry.

          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