longld / peda

PEDA - Python Exploit Development Assistance for GDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

peda plug-in fails to start

D1ag0n-Young opened this issue · comments

After installing the peda plug-in, the gdb plug-in fails to start, as follows:

yrl@yrl-virtual-machine:~/peda$ echo "source ~/peda/peda.py" >> /.gdbinit
yrl@yrl-virtual-machine:
/peda$ gdb
GNU gdb (GDB) 10.2
Copyright (C) 2021 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 "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
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".
/home/yrl/.gdbinit:1: Error in sourced command file:
~/peda/peda.py:8: Error in sourced command file:
Undefined command: "from". Try "help".
(gdb) pi import sys;print(sys.version)
Python scripting is not supported in this copy of GDB.
(gdb)

What's the reason?

Thank you, I found the reason, the python version was not specified when compiling gdb