Docker plugin debug from container doesn't work
-
wrote on 24 May 2022, 11:28 last edited by
I encountered problems debugging remote device from docker container.
I am using a kubuntu machine if that matters. Device manufacturer provided instructions on how to compile Buildroot OS image from CentOS docker container. After completing i have sdk-folder with compilers, qmake and gdb, that are compiled for CentOS. I inserted that sdk into the said container and saved the image. In QtCreator i added new docker device, with that image, mounted project directory and specified to look for kit items in sdk folder, that i inserted. After that, qtcreator created the kit from docker. I changed it, as in picture:
elvees-device is device in local network
build device is container i used
compilers and qmake have path in container: docker://elvees:240522-08/src/buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-gcc/g++/qmake
but sysroot and mkspec paths are on my pc, because it seems, qt doesnt get those from container.
and with this setup i managed to build gui apps and all good.
the problem with debugger though, the path in docker is working properly, qt creator sees it, but when i start debug with breakpoint at start of main(), debugging process ends.
If i set the debugger path not from docker, but on my pc, using the same executable from sdk folder, debugging works properly, however this doesnt feel right, because this compatibility between centos and ubuntu executables might crash when i run apt-get update/upgrade and my glibc version changes. This docker plugin is experimental, so this behavior might be intended. -
wrote on 26 May 2022, 06:40 last edited by
Actually, when i am using the kit, it says:
warning: "/src/buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-g++" is used by qmake, but "docker://elvees:240522-08/src/buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-g++" is configured in the kit. Please update your kit (elvees-device-203-testing2) or choose a mkspec for qmake that matches your target environment better.
looks like i am using compiler not from docker, but from folder on my pc. but when i tried to specify path to mkspec in docker it didn't work. Another question is: does QtCreator actually use the compiler from inside of docker environment?
1/2