libretro / blastem

Upstream tracking repo of BlastEm, the fast and accurate Genesis emulator, with libretro specific changes
https://www.retrodev.com/blastem/
GNU General Public License v3.0
54 stars 25 forks source link

GDB "Failed to read input file descriptor" #2

Closed slembcke closed 5 years ago

slembcke commented 5 years ago

First of all, thank you so much for the embedded debugger! I found it accidentally, and was pleasantly surprised to find that my first instinct to type in GDB style commands just worked. It has been terribly helpful for teaching myself Genesis homebrew dev and 68k assembly from scratch.

I've been trying to get GDB support working for symbols and whatnot. I grabbed the latest GDB version and built it to target with m68k-elf. I ran it with m68k-elf-gdb genesis.elf, then ran target remote | blastem genesis.bin -D within. Blastem launches and immediately puts up a "Fatal Error" dialog with Failed to read on GDB input file descriptor. I think I followed the instructions to the letter? Should I have tried an older version of GDB? Inside GDB I get:

(gdb) target remote | blastem genesis.bin -D
Remote debugging using | blastem genesis.bin -D
Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000

I've never really used GDB remote debugging much, and am still trying to read through the relevant docs to understand how it's supposed to work.

slembcke commented 5 years ago

Ok, I tried a few more GDB versions. 8.3, 7.12, 7.10, 7.9.1, and 7.8.2 also didn't work. I couldn't get 7.7 or earlier to build trivially on my machine so I stopped there.

I guess my next step is to stick a program between GDB and intercept what the actual commands are, and try and trace through gdb_remote.c.

slembcke commented 5 years ago

Erm. Sorry, it looks like this is just a mirror of the mercurial repo. Bah!