View Single Post
Old 08-28-2021, 06:04 AM   #11
Aramir
Enthusiast
Aramir began at the beginning.
 
Aramir's Avatar
 
Posts: 41
Karma: 10
Join Date: Sep 2017
Device: Kobo Libra H2O & Glo & Glo HD
Quote:
Originally Posted by OfficerAction View Post
I'm using QtCreator and it's perfectly possible to debug kobo apps remotely. You just have to build GDB and GDB server and put the server on your kobo device.
That's interesting, does it require any specific "kit" modification on QtCreator end ? I never used QtCreator to debug remotely before. For now whenever I try to launch a debug session it fails complaining about a missing XML target description
Code:
2:02:10: Checking available ports...
12:02:10: Found 101 free ports.
12:02:10: Starting /usr/bin/gdbserver...
12:02:10: Debugging starts
Listening on port 10000
Remote debugging from host 192.168.1.2, port 1130
Process /mnt/onboard/.adds/Obenkyobo/launcher.sh created; pid = 1815
while parsing target description (at line 4): Target description specified unknown architecture "arm"
Could not load XML target description; ignoring
Killing process(es):
 1815
12:02:11: Application finished with exit code 0.
12:02:11: Debugging has finished
When using gdb-multiarch (instead of gdb) in QtCreator it seems to start correctly but I receive random SIGABRT. So I don't know what's going on here.

I already have gdb and gdbserver on my kobo.

Sorry for the delay, vacation time ! Also I'm hanging out in the discord if you want to explain everything to me over there. It might be faster.

EDIT :

After several experiences I decided to turn on my brain and actually proper read about the error message and gdb-multiarch.

You can make gdb-multiarch work with QtCreator and kobo, you just have to set it correctly for arm by : Tools->Options->Debugger->GDB->Additional Startup Commands : -q --nh -ex 'set architecture arm'

Or use OfficerAction's scripts to cross compile and install gdb for arm https://github.com/Rain92/kobo-qt-setup-scripts


And while you're at it, you might as well as an extra step in the deployment process and have QtCreator run a script to kill nickel and prepare your env variables :
Projects->Kobo(Kit)->Run->Deployment-> Add Run custom remote command : /mnt/onboard/.adds/Obenkyobo/debugEnv.sh (for both Release and debug)

Thanks Niluje, Niluma, OfficerActions for listening to me venting on discord ^^

Last edited by Aramir; 09-02-2021 at 06:24 PM.
Aramir is offline   Reply With Quote