Closed geigerzaehler closed 10 months ago
Yep, this is certainly functionality gdbstub
should support.
Unfortunately, this will require a breaking API change, as the current read_addrs
API returns a TargetResult<(), Self>
, whereas we'd want to return a TargetResult<usize, Self>
, where the usize
indicates the number of bytes written into the read buffer.
The PR should be pretty easy to implement, so if you're interested in taking a shot at getting this working, feel free to open one that targets the dev/0.7
branch!
Closed now that gdbstub 0.7 has been released
GDBs
m
command allows the stub to respond with fewer bytes than requested if part of the memory is not accessible. Implementations ofSingleThreadBase::read_addrs()
cannot make use of that feature. If an implementation writes fewer bytes to thedata
argument the remaining bytes will be zero.(Happy to provide a PR for this if you want me to.)