QT Creator remote cross debugging
-
wrote on 16 Jun 2023, 14:17 last edited by JoVi
Hello everyone,
In short, I want to build an application on a unix x86_64 desktop machine with QT Creator. The application is cross built for an arm64 architecture.
Here is the thing: I can deploy and remote debug the application very well if I set up the Deploy and Run steps in the Project Settings page.
Now I face a problem: The deployed executable should be started over a start script to set proper variables like LD_LIBRARY_PATH and evaluate the list of starting parameters depending on the environment of the remote machine.
I made a dummy hello world program which I can deploy and remote debug, if used directly. I made a start script for this dummy hello world program and added it as alternate remote executable (and marked the checkbox to use this instead) :
#!/bin/bash echo "It is me, the script" echo $(date) /mypath/helloworld
And I cannot remote debug it that way. Any clues?
This is the error message I get from QT Creator after I hit debug:X11 forwarding request failed
Listening on port 10000
Remote debugging from host 1.3.2.6, port 59810
gdbserver: Unable to determine the number of hardware watchpoints available.
gdbserver: Unable to determine the number of hardware breakpoints available.
Process /mypath/startscript.sh created; pid = 2089
File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead. -
Hello everyone,
In short, I want to build an application on a unix x86_64 desktop machine with QT Creator. The application is cross built for an arm64 architecture.
Here is the thing: I can deploy and remote debug the application very well if I set up the Deploy and Run steps in the Project Settings page.
Now I face a problem: The deployed executable should be started over a start script to set proper variables like LD_LIBRARY_PATH and evaluate the list of starting parameters depending on the environment of the remote machine.
I made a dummy hello world program which I can deploy and remote debug, if used directly. I made a start script for this dummy hello world program and added it as alternate remote executable (and marked the checkbox to use this instead) :
#!/bin/bash echo "It is me, the script" echo $(date) /mypath/helloworld
And I cannot remote debug it that way. Any clues?
This is the error message I get from QT Creator after I hit debug:X11 forwarding request failed
Listening on port 10000
Remote debugging from host 1.3.2.6, port 59810
gdbserver: Unable to determine the number of hardware watchpoints available.
gdbserver: Unable to determine the number of hardware breakpoints available.
Process /mypath/startscript.sh created; pid = 2089
File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.wrote on 21 Jun 2023, 17:08 last edited by JoViDoes anyone have an idea? I want to debug a binary which is started over a start script. Debugging the binary directly works.
Also if i set the start script to not start the binary directly, but add "gdbserver :7777 /mypath/helloworld", I can connect to the debugger using the "Debug -> Start Debugging -> Connect To Remote" and fill out the details there. However, this disrupts my workflow and needs manual patching.
Is it somehow possible to have a start script as alternate executable in the project settings AND being able to remote debug it?
1/2