luser / rust-gdb-remote-protocol

A Rust crate implementing the GDB Remote Serial Protocol
Apache License 2.0
33 stars 13 forks source link

[WIP] implement vFile packet support #54

Closed froydnj closed 4 years ago

froydnj commented 6 years ago

I think I still need to write a few more tests, and github tells me I need to rebase, but this is at least at the point that things build and pass tests; feedback would be useful.

I don't know where to stick the handlers. Handler is the obvious place, but it feels like the host I/O stuff is conceptually separate, and people should be able to mix-and-match with handlers and not have to rewrite a Handler implementation. Maybe that's overthinking it (probably is for gdb-minidump MVP), and the only reasonable host I/O implementation is one that essentially does host libc calls.

tromey commented 6 years ago

I skimmed the patch a bit and nothing jumped out at me. I think it seems reasonable.

Maybe that's overthinking it (probably is for gdb-minidump MVP), and the only reasonable host I/O implementation is one that essentially does host libc calls

I sometimes consider writing a federated gdbserver. In a case like this the I/O implementation would forward to some other server. So, I think this has to be abstracted somehow.

One idea might be to have a second Handler-like thing and have process_packets_from take another argument.

jD91mZM2 commented 4 years ago

I went ahead and implemented a libc-handler in my fork

jD91mZM2 commented 4 years ago

Merged a modified version of this on master, huge thanks!