> 
> The interface can be rather minimal, if I recall correctly.
> But I guess nobody has looked into this since?

The interface is indeed rather minimal, it basically only allows setting and 
removal of breakpoints and memory reading (and writing) (1).

But GDB still expects an architecture it can understand when it reads and write 
memory using it, specifically the object files mapped in RAM must have debug 
information GDB understands (say, dwarf3).

It is the GDB process that does the translation from address to source lines 
etc, so using the remote debugger does not really help. If our compiler 
generated in-ram elf objects it would work just as well to debug locally, 
without any addition of a gdbserver interface.

Something that _would_ work, but be insanely fiddly, would be to fake the 
remote api memory layout etc so that it looks like we have compiled ELF 
objects. But that seems harder than making sure we actually do have them.

1: https://sourceware.org/gdb/onlinedocs/gdb/Remote-Protocol.html

— 
Per Hedbor

Reply via email to