-
Notifications
You must be signed in to change notification settings - Fork 852
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
Failed to print 'context' when debugging MIPS64 target #1097
Comments
Hi, mind sharing an example binary for this? |
Sure no problem. It's just a simple As mentioned, this problem is caused by the different register names between MIPS o32 and n64 ABI. The defined RegisterSet in |
Btw what does Is
|
Fwiw i had to compile my own binary, via |
I got this one
I used this same compiler and qemu-user as yours, and debugging with |
Description
When debugging qemu-user mips64 target, pwndbg fails to print the 'context' and the exception backtrace is:
After a few simple debugging, it looks like the value of register 't4' is 'None', which is due to the lack of support for MIPS64 (n64&n32 ABI) RegisterSet.
The register names are different in n64 and o32 ABI. The only support RegisterSet in
regs.py
for MIPS is the o32(maybe also o64) ABI.You may inspect the current MIPS ABI through
show mips abi
gdb command.Steps to reproduce
Gdb session history:
set exception-verbose on
context regs
My setup
Platform: Linux-5.15.0-46-generic-x86_64-with-glibc2.35
Gdb: 12.0.90
Python: 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
Pwndbg: 1.1.0 build: 5d35858
Capstone: 4.0.1024
Unicorn: 2.0.0
This GDB was configured as follows:
configure --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-auto-load-dir=$debugdir:$datadir/auto-load
--with-auto-load-safe-path=$debugdir:$datadir/auto-load
--with-expat
--with-gdb-datadir=/usr/share/gdb (relocatable)
--with-jit-reader-dir=/usr/lib/gdb (relocatable)
--without-libunwind-ia64
--with-lzma
--with-babeltrace
--with-intel-pt
--with-mpfr
--with-xxhash
--with-python=/usr (relocatable)
--with-python-libdir=/usr/lib (relocatable)
--with-debuginfod
--without-guile
--enable-source-highlight
--with-separate-debug-dir=/usr/lib/debug (relocatable)
--with-system-gdbinit=/etc/gdb/gdbinit
--with-system-gdbinit-dir=/etc/gdb/gdbinit.d
The text was updated successfully, but these errors were encountered: