Qemu - Remote debugging loop
Environment information
- Operating System: Manjaro
- Cutter version: 2.3.4
- Obtained from:
- [ ] Built from source
- [x] Downloaded release from Cutter website or GitHub
- [ ] Distribution repository
- File format: AppImage
Describe the bug
The connection to gdb loops forever when trying to run a mips binary with Qemu. Works with rizin from package manager.
To Reproduce
Steps to reproduce the behavior:
- Run
qemu-mipsel -L buildroot/output/target/ -g 1234 ./mipsel.bin - On cutter: Connect to a remote debugger
- Enter 127.0.0.1:1234
- Connecting loop..
And rizin -a mipsel -d gdb://localhost:1234 works fine.
Expected behavior
The remote debugger connects.
Screenshots
Bonus: when clicking Cancel or closing, cutter starts freezing and I have to kill the process.
Am I doing anything wrong ?
What version of the QEMU do you use? Also, @wargio is currently working on MIPS support improvement, thus relatively soon it will be heavily updated in Cutter.
Here is what I have:
$ qemu-arm --version
qemu-arm version 9.0.2
$ gdb --version
GNU gdb (GDB) 15.1
Could you try connecting using plain Rizin? It will show the exact error in the log if there's any.
i'm not sure that rizin -a mipsel is a valid arch.
As said initially, rizin worked.
From my history, I tried both rizin -a mips and rizin -a mipsel, so I'm not sure anymore which one worked.
Seems like duplicate of #3277
I encounter the same problem. I'm using Cutter-v2.4.1-Windows-x86_64
Starting server:
> gdbserver --version
GNU gdbserver (GDB) 16.2
Copyright (C) 2024 Free Software Foundation, Inc.
gdbserver is free software, covered by the GNU General Public License.
This gdbserver was configured as "x86_64-w64-mingw32"
> gdbserver-multiarch --multi 127.0.0.1:1337
Listening on port 1337
Attaching from Cutter
At this point, nothing changed in gdbserver, still saying Listening on port 1337
Meanwhile, using rizin works
> rizin -d gdb://127.0.0.1:1337
-- Use V! to enter into the visual panels mode (dwm style)
[0x00000000]>
And we can see that gdbserver accepted the connection
>gdbserver --multi 127.0.0.1:1337
Listening on port 1337
Remote debugging from host 127.0.0.1, port 22952