Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined command...peda help #144

Open
Janette88 opened this issue Oct 26, 2019 · 2 comments
Open

undefined command...peda help #144

Janette88 opened this issue Oct 26, 2019 · 2 comments

Comments

@Janette88
Copy link

hi, i have a problem. when i was debugging a program using gdb-peda, i got a feedback like this:
gdb-peda$ attach 1584
'Undefined command: c\x00\x00\x00o\x00\x00\x00n\x00\x00\x00t\x00\x00\x00e\x00\x00\x00x\x00\x00\x00t\x00\x00\x00. Try "peda help"'
'Undefined command: s\x00\x00\x00e\x00\x00\x00s\x00\x00\x00s\x00\x00\x00i\x00\x00\x00o\x00\x00\x00n\x00\x00\x00. Try "peda help"'

before debugging, i fininshed the installation of peda:
git clone https://github.com/longld/peda.git ~/peda
echo "source ~/peda/peda.py" >> ~/.gdbinit

what's wrong with my peda? please help me!

@Janette88
Copy link
Author

my python version is :
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
gdb version is:
fusion@fusion:~$ gdb -v
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08

@bb33bb
Copy link

bb33bb commented Jul 24, 2020

my python version is :
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
gdb version is:
fusion@fusion:~$ gdb -v
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08

我猜测根本原因在于编译python的时候你忘了添加一个选项。最初我也遇到了这个错误,编译python的时候,添加上这句话
../configure --prefix=/usr/local --enable-optimizations --enable-unicode=ucs4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants