luser / rust-gdb-remote-protocol

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

Get a gdb integration test working for a non-exited program #53

Open luser opened 6 years ago

luser commented 6 years ago

I landed a basic framework for writing gdb integration tests. It only has one test right now, and that test returns StopReason::Exited(...), so running gdb against the test server makes gdb disconnect right away (because we're not using extended-remote). If I change the test server to return StopReason::Signal(...) GDB first prints a warning that it can't find an executable (because we don't support qXfer etc) and then hangs while repeatedly printing Ignoring packet error, continuing.... I don't know if fixing the file issue would fix that or not, I didn't test that yet.

We should get a test passing that does at least that, and then keep building from there.

luser commented 6 years ago

I don't think we're very far off! If I change noop-server to return Stopped(Signal(11)) for stop_reason, and feed gdb file /build/hello so it has a binary to work with, it gets hung up because it sends a g packet and doesn't like getting an empty response.