You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i debug with mips64, it goes wrong. file command check the file is:
./bin/busybox: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 2.6.10, stripped
when debug with gdb, it reports:
pwndbg> target remote 127.0.0.1:1234
Remote debugging using 127.0.0.1:1234
warning: remote target does not support file transfer, attempting to access files from local filesystem.
Reading symbols from /home/r00kie/Desktop/_RV32X.bin.extracted/_6D0040.extracted/cpio-root/lib64/ld-2.9.so...(no debugging symbols found)...done.
0x0000004000802b70 in ?? () from /home/r00kie/Desktop/_RV32X.bin.extracted/_6D0040.extracted/cpio-root/lib64/ld-2.9.so
ERROR: Could not find ELF base!
'context': Print out the current register, instruction, and stack context.
Accepts subcommands 'reg', 'disasm', 'code', 'stack', 'backtrace', and 'args'.
Exception occured: context: unsupported operand type(s) for +: 'NoneType' and 'int' (<class 'TypeError'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on
how can i do to solve the problem?
The text was updated successfully, but these errors were encountered:
are you debugging a linux ELF binary, or is it some kind of a system image? I assume the former as the binary is busybox but it's still good to ask.
Also, do you use gdb that supports target architecture? See show arch (and then set arch to a proper one). If your gdb doesn't have the one you need (mips64?) you might want to install gdb-multiarch (there should be such package on debian like systems) or compile gdb with all target supports (I'd recommend this way, as you would also get newer gdb):
wget https://ftp.gnu.org/gnu/gdb/gdb-8.2.1.tar.gz
tar -xvf gdb-8.2.1.tar.gz
cd gdb-8.2.1
mkdir build
cd build
../configure --prefix=/usr --disable-nls --disable-werror --with-system-readline --with-python=/usr/bin/python3.6 --with-system-gdbinit=/etc/gdb/gdbinit --enable-targets=all
make -j7
sudo make install
Note that you need to specify proper python3 path (I assumed python3.6) and need some libs installed here (e.g. readline) otherwise the configure or make will fail.
when i debug with mips64, it goes wrong.
file
command check the file is:when debug with gdb, it reports:
how can i do to solve the problem?
The text was updated successfully, but these errors were encountered: