Hello,
We try to debug our cross-compiled c application with qt-creator and encounter Python problems.
The direct access from gdb to gdbserver also displays errors.
Our first question is, why the yocto-image 2.7 contains an older gdbserver version (7.8) in comparison to the gdb debugger build for the SDK (7.11).
The second question is, why the gdb debugger gives us the following start up warnings:
./arm-angstrom-linux-gnueabi-gdb /home/cc/evtest_1/evtest_1
Python Exception <class 'ImportError'> No module named 'imp':
warning:
Could not load the Python gdb module from `/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (Linaro GDB) 7.8-2014.09
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-angstromsdk-linux --target=arm-angstrom-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.linaro.org>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/cc/evtest_1/evtest_1...done.
(gdb) python import sys; print(sys.version)
3.5.2 (default, Sep 25 2017, 11:27:51)
[GCC 5.2.1 20151005]
(gdb)
Qt-creator debugger log:
>&"python sys.path.append('/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/usr/bin/arm-angstrom-linux-gnueabi/data-directory/python')\n"
>13^done
>&"python from gdbbridge import *\n"
>&"Error while executing Python code.\n"
>14^error,msg="Error while executing Python code."
>&"python theDumper.loadDumpers({\"token\":15})\n"
>&"Error while executing Python code.\n"
>15^error,msg="Error while executing Python code."
dNOTE: ENGINE SETUP FAILED
dState changed from EngineSetupRequested(1) to EngineSetupFailed(2) [master]
dHANDLE RUNCONTROL FINISHED
sDebugger finished.
sUser requested stop. Shutting down...
dHANDLE RUNCONTROL START FAILED
dState changed from EngineSetupFailed(2) to DebuggerFinished(22) [master]
dQUIT DEBUGGER REQUESTED IN STATE 22
>16^done
dCOOKIE FOR TOKEN 16 ALREADY EATEN (DebuggerFinished). TWO RESPONSES FOR ONE COMMAND?
Thank you in advance,
Jens Römer