rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.73k stars 1.15k forks source link

GDB: cannot connect to server while rizin can #3350

Open boborjan2 opened 4 months ago

boborjan2 commented 4 months ago

Environment information

Describe the bug This works: rizin.exe -d gdb://172.21.208.1:1235 (I verified by wireshark. RSP comm between rizin and mingw gdbserver running on Win11, started with a PE32 file by: gdbserver 172.21.208.1:1235 bin/api_test.exe. gdbserver can be connected using gdb, r2, rizin)

However, when I load the target.exe in Cutter and then connect to the very same gdbserver, I get a popup and Cutter gets nonresponsive. Wireshark shows no communication to the gdbserver. I tried to not load the exe as well, but it is not clear to me whether it is supported.

Cutter gets frozen when using gdbserver.

To Reproduce Start a gdbserver and connect to it with Cutter.

Expected behavior

Cutter is able to connect to a gdbserver rizin can access.

Screenshots

image

And no comm in wireshark.

Additional context

boborjan2 commented 4 months ago

I tried the same in Linux (WSL). I can connect to the gdbserver via gdb in wsl prompt (gdb->target remote 172.21.208.1:1235), comm is visible in wireshark. Cutter started from the very same terminal however just displays the same popup, gets unresponsive and needs to be terminated with kill -9.

karliss commented 4 months ago

Was able to obtain similar result by running everything on Linux.

boborjan2 commented 4 months ago

Was able to obtain similar result by running everything on Linux.

Thx, I updated description accordingly.

boborjan2 commented 4 months ago

seemingly very similar or duplicate of https://github.com/rizinorg/cutter/issues/3277

andreas-jonsson commented 5 days ago

Running Cutter 2.3.4 Flatpak build on Debian shows the same issue. I have a custom GDB stub and I can't see any connection attempt at all. It just freezes.

Is there a workaround for this? If not, do anyone know of a previous version that did work?

wargio commented 5 days ago

i think is also due flatpak not allowing doing debug.

andreas-jonsson commented 5 days ago

i think is also due flatpak not allowing doing debug.

Hmm.. I will check that. But I would assume outgoing connections are not a problem.

wargio commented 4 days ago

that is true. sorry i misread the messages.