TL;DR: this particular stop reason required making an API breaking change, and cannot land in a 0.7.x release.
Unlike all the other stop reasons defined in the GDB RSP, whose payloads are simple fixed-size structures (like a tid, or number, etc...), exec's payload is a fixed size "absolute pathname of the file that was executed, in hex".
The most natural representation of this variant would be something like BaseStopReason::Exec { tid: Tid, name: &'a [u8] }. Alternatively, we could also have an easier-to-use "Owned" variant, where name is a Vec<u8>, when alloc is available.
Unfortunately, both approaches are impossible to land in a semver compatible manner (in a 0.7.x release):
BaseStopReason does not currently have a lifetime associated with it, so adding a name: &'a [u8] won't be possible
BaseStopReason is (IMO, unfortunately) marked as #[derive(Copy)], so having a variant include Vec<u8> is impossible
See discussion at #170 (comment) for more context.
In the meantime - I'm opening a tracking issue tagged with the 0.8 milestone, so that when I commit to cutting a new major version of gdbstub, I won't forget to add this new variant alongside other breaking changes.
If this is something you're interested in, please leave a comment on this issue, and/or send a PR targeting the dev/0.8 branch.
TL;DR: this particular stop reason required making an API breaking change, and cannot land in a
0.7.xrelease.Unlike all the other stop reasons defined in the GDB RSP, whose payloads are simple fixed-size structures (like a tid, or number, etc...),
exec's payload is a fixed size "absolute pathname of the file that was executed, in hex".The most natural representation of this variant would be something like
BaseStopReason::Exec { tid: Tid, name: &'a [u8] }. Alternatively, we could also have an easier-to-use "Owned" variant, wherenameis aVec<u8>, whenallocis available.Unfortunately, both approaches are impossible to land in a semver compatible manner (in a
0.7.xrelease):BaseStopReasondoes not currently have a lifetime associated with it, so adding aname: &'a [u8]won't be possibleBaseStopReasonis (IMO, unfortunately) marked as#[derive(Copy)], so having a variant includeVec<u8>is impossibleSee discussion at #170 (comment) for more context.
In the meantime - I'm opening a tracking issue tagged with the 0.8 milestone, so that when I commit to cutting a new major version of
gdbstub, I won't forget to add this new variant alongside other breaking changes.If this is something you're interested in, please leave a comment on this issue, and/or send a PR targeting the
dev/0.8branch.