This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: Cannot debug Qt application

Part Number: PROCESSOR-SDK-AM335X


Tool/software: Linux

Hi,

I just installed the Processor SD RT 04.03.00.05 and I' m facing a problem with gdb in Qt Creator. Following the log:

&"python sys.path.insert(1, '/home/dev/apps/Qt/Tools/QtCreator/share/qtcreator/debugger/')\n"

>28^done



>&"python sys.path.append('/home/dev/apps/am335x-sdk/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/data-directory/python')\n"

>29^done



>&"python from gdbbridge import *\n"

>&"Traceback (most recent call last):\n"

>&" File \"<string>\", line 1, in <module>\n"

>&" File \"/home/dev/apps/Qt/Tools/QtCreator/share/qtcreator/debugger/gdbbridge.py\", line 37, in <module>\n"

>&" import tempfile\n"

>&" File \"/home/dev/apps/am335x-sdk-rt-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/python3.5/tempfile.py\", line 43, in <module>\n"

>&" import shutil as _shutil\n"

>&"ImportError: No module named 'shutil'\n"

>&"Error while executing Python code.\n"

>30^error,msg="Error while executing Python code."



>&"python theDumper.loadDumpers({\"token\":31})\n"

>&"Traceback (most recent call last):\n"

>&" File \"<string>\", line 1, in <module>\n"

>&"NameError: name 'theDumper' is not defined\n"

>&"Error while executing Python code.\n"

>31^error,msg="Error while executing Python code."

dNOTE: ENGINE SETUP FAILED

dState changed from EngineSetupRequested(1) to EngineSetupFailed(2) [master]

<Debugging has failed

dState changed from EngineSetupFailed(2) to DebuggerFinished(17) [master]



dQUIT DEBUGGER REQUESTED IN STATE 17

>32^done

dCOOKIE FOR TOKEN 32 ALREADY EATEN (DebuggerFinished). TWO RESPONSES FOR ONE COMMAND?

Effectively inside the path "<SDK>/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/python3.5" the shutil module is missing.

There is also a reference to "<SDK>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/data-directory/python" that doesn' t exist.

Anybody had the same issue?

What is the Python version to use on the host?

Thank you in advance, 

Best regards.

Raffaele 

  • Hello Raffaele,

    Please, follow this thread. It still in progress. I am working on it.

    Best regards,
    Kemal

  • Hi Kemal,

    thank you for your quick reply. I've already tried with those suggestions but it doesn't work.

    I don't have any issue with breakpoints, the debugger fail to start.

    The problem seems to be more like the one in this thread but I can't figure out what can be the problem.

    I've also tried to reinstall the previous SDK (working) versions and with both QtCreator 4.5.1 and 4.6.0 but the problem is still present.

    Trying to manually add .py missing files (shutil, threading, fnmatch, ....) led to missing _posixsubprocess module that it seems to be available only in "<SDK>/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/python3.5" so the module is not available for the host.

    Right now I'm downloading the not-RT SDK version to see if there is any difference.

    Thank you,

    Raffaele

  • Hi Kemal,

    I've replaced the arm-linux-gnueabihf-gdb in "<SDKPATH>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin" with the one extracted from 

    https://releases.linaro.org/components/toolchain/binaries/6.2-2016.11/arm-linux-gnueabihf/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz

    and the debugger works (including breakpoint)!

    The GDB distributed with the processor sdk is linked to python 3.5.2 but the python scripts included in the SDK are not complete.

    The executable extracted from the toolchain is linked to python 2.7 and in this case all the files are coherent.

    Are the "<SDKPATH>/linux-devkit/sysroots/x86_64-arago-linux/usr/lib/python3.5" files generated with the rootfs? Maybe there is something missing in the configuration.

    Anyway thank you so much for your help.

    Kind regards,

    Raffaele

  • Precisely. The version of arm-linux-gnueabihf-gdb in the external linaro toolchain is GNU gdb (Linaro_GDB-2016.11) 7.12.0.20161122-git but the linux-devkit provides the old GNU gdb (Linaro GDB) 7.8-2014.09 binaries. That explains why the SIGSEGV error occurred between Processor SDK 1.03 and Processor SDK 2.0 since the externali linaro toolchain version has fist changed then.

    Thank you for pointing this out. I will notify the SDK team to fix this in the next SDK release.