-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update single_step_gdb_behavior
of all architectures with proper value
#95
Conversation
@@ -263,7 +250,4 @@ pub enum SingleStepGdbBehavior { | |||
/// | |||
/// e.g: MIPS | |||
Ignored, | |||
/// Unknown behavior - no one has tested this platform yet. If possible, | |||
/// please conduct a test + upstream your findings to `gdbstub_arch`. | |||
Unknown, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this variant would technically be a breaking API change, and given how "small" the change is, I'd rather not push out a whole new gdbstub 0.7 for that.
Instead, lets just mark this variant as #[doc(hidden)]
, and then I'll spin up a tracking task to remove the variant entirely whenever the next breaking release comes out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you need to release gdbstub
0.7 only for this?
You can just leave this commit in the dev/0.7
branch and release it along with all the other changes when they are done in gdbstub
0.7.
And you can release gdbstub_arch
0.2.1 for this commit. Then people won't encounter breaking API change for this even gdbstub
0.7 is released in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I know all this, but this PR is targeting master
, not (the currently non-existent) dev/0.7
branch.
This is a good reminder that I should set up a dev/0.7
branch now as well, and once I do that, it'd be reasonable to open a second PR that removes this variant on that branch (though given how small the change is, that's something I'd just do myself...)
Please add the #[doc(hidden)]
attribute as part of this PR, so that I can push out gdbstub
0.6.1 that soft-deprecates this variant, along with pushing out gdbstub_arch
0.2.1, which includes the semantic Arch
changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I add SingleStepGdbBehavior::Unknown
back, although I'm really reluctant to do this.
I think it's really not necessary to push out gdbstub
0.6.1 that the only difference with 0.6.0 is #[doc(hidden)]
, because even if Unknown
exists, nobody will use it. People won't notice it if they use the defined architecture, and if they want to create a new architecture, they will clear it is not something they need. You only need to push out gdbstub_arch
0.2.1.
That said, given that these changes would all be non-breaking and land in
gdbstub_arch
, it's fine to have someUnknown
s for now and update things as folks have time to look into each arch.
So the first commit after gdbstub
0.6.0 is a breaking API change🙃
Fine, it's your project and you are always right. You can just revert the later commit after you create the dev/0.7
branch🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I implemented the Unknown variant, I knew full well that it'd end up getting removed fairly quickly, and that I'd need to push out a new minor gdbstub_arch
release, along with (possibly) a new minor gdbstub
release that soft-deprecates the newly added variant.
While it may seem silly to add a feature to 0.6 that immediately gets soft deprecated, the reality is that - for my own sanity - I really just wanted to get 0.6 out the door ¯\_(ツ)_/¯
So the first commit after
gdbstub
0.6.0 is a breaking API change🙃
Not super sure what you mean by that.
Of course, whatever first commit ends up in dev/0.7
will be a breaking change. That's the whole point of opening a new dev
branch - to put in any new breaking changes.
It could have just as easily been the case that you disappeared for a few months, and in the meantime, someone else came along and opened a PR to add a new non-breaking protocol extension to the library, which wouldn't even require opening a new dev/0.7
branch
Ehh, I don't have the energy to argue here. Given that going from
wrt. wrt.
|
I've decided to hold off on releasing If I misunderstood your intent, and you'd like to see 0.6.1 published with this doc tweak, do let me know. |
Yes, that's what I want! |
I should probably clarify how I structure branches on this repo:
Do you see why I asked you to re-add This PR is being merged into Instead, we've merged this PR into |
IIRC, you created |
Yeah, that was just a fluke :) The 0.4 -> 0.5 transition is a better example - in that case, there were quite a few non-breaking features implemented on Just so you know, now that 0.6 is released, I'm going to be taking a step back from I'm hoping that in that time, folks will still send smaller, semver-compatible protocol extension IDET PRs (targeting the That said, it sounds like you have some breaking-change PRs you'd like to send my way. If that's the case, I've gone ahead and make a |
Oh, I don't have other breaking-change PRs to be sent, this is the only breaking-change PR😅 |
Description
I create a generic stub
gdb_generic.rs
which can be used to test the behavior of single step of all architectures. All you need isset architecture
with the architecture you want to test beforetarget remote
, for example:I don't consider the situation that
single_step_gdb_behavior
should be set toOptional
because as I said in #92 (comment), it only possible happens on arm.This generic stub uses the Dynamic Arch selection (#53) way.
And you may notice that
resume
andwrite_registers
are totally useless for this real program, but I must implement them. We may make them optional?API Stability
Checklist
cargo build
compiles withouterrors
orwarnings
cargo clippy
runs withouterrors
orwarnings
cargo fmt
was runexamples/armv4t
examples/armv4t
withRUST_LOG=trace
+ any relevant GDB output under the "Validation" section below./scripts/test_dead_code_elim.sh
and/or./example_no_std/check_size.sh
)Arch
implementation