Closed Phantom1003 closed 4 years ago
You probably don't have the necessary OS packages installed to support python. If you look at the build-gdb-linux/gdb/config.log file you will see checks for python support, and probably one of them failed. Note that you may need to have a python development package installed in order for gdb to find python header files and libraries. That is the part most likely missing. You probably have the pythoin package installed but not the python developer package. This varies from one distro to the next.
I find info in build-gdb-linux/gdb/config.log
:
configure:10550: checking for python2.7
configure:10568: gcc -o conftest -g -O2 -I/usr/include/python2.7 -I/usr/include/python2.7 -static-libstdc++ -static-libgcc conftest.c -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lm -ldl >&5
conftest.c:53:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
And I run the command
sudo apt-get install python-dev
Although I am still compiling, I think this should work, thanks
By the way, you should also use a python2 version gef. https://github.com/hugsy/gef-legacy Hope riscv-gdb upgrade py3 as soon as possible
I run riscv64-unknown-linux-gnu-gdb with gef, got the following info:
And the result of configuration show that python is closed
I think the reason is because of my environment, my desktop got the python support with same code Desktop
vm in laptop
Could you give me some suggestion? Thanks