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
Rework vAttach + custom pid reporting #133
Conversation
I've implemented this, and it does still work! Though as a minor nit, there's a pointy thing for users to watch out for -- forgetting to implement
|
Happy to see the removal of the comment about it being an untested code path. Once the Renode changes land, I'll finish up the kernel stuff and then share instructions on how to use gdbstub with the emulator. It should also work with real hardware at that point. |
Are you sure that error is from Because the code should throw that error if you try and use vAttach without having implemented the |
The stub didn't crash, the issue definitely came from within gdb. It was similar to what I experienced when I didn't have |
Are you certain of that? Because those
messages make me think that the stub died... Any chance you could try and repro using the in-tree armv4t example? i.e: comment out the |
I won't be able to test it for another week -- I'm attending Latchup in Santa Barbara this weekend. |
Sure, no rush. Also, when you get the chance: can you let me know what GDB client version you're using? |
I had a chance to test it, and you're right in that it's caused by the error:
This wasn't caught in my system because unlike Ordinarily I'm testing riscv stuff with https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/ but for this I'm using |
Yeah, that lines up with what I expected.
I suggest that you make sure you're properly logging In any case though, with that out of the way - does this code look good to you? Any other issues, or can I merge it in? |
It looks good to me. Would you mind merging it and bumping the revision so I can pull it into the kernel? |
Sounds good. I'll go ahead and do that now (and hopefully push out a revision at some point in the next ~1h or so) |
gdbstub 0.6.5 has been published to crates.io |
Description
Follow up to #129
Spent some time reworking the implementation in order to:
There are some "warts" in this implementation, owing to the fact that I'd like to land this as part of a non-breaking
0.6.x
release. Namely: the runtime bound that only allows usingattach
ifCurrentActivePid
is implemented.Assuming we're happy with this PR, I'll open a follow-up tracking issue to resolve these API warts in 0.7.x.
API Stability
Checklist
rustdoc
formatting looks good (viacargo doc
)examples/armv4t
withRUST_LOG=trace
+ any relevant GDB output under the "Validation" section below./example_no_std/check_size.sh
before/after changes under the "Validation" section belowexamples/armv4t
./example_no_std/check_size.sh
)Validation
GDB output
armv4t output
Before/After `./example_no_std/check_size.sh` output
Before #129
After #129
This PR