Skip to content

Support exec vCont Stop Reason #185

Description

@daniel5151

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions