feat: Enable gdb debugging on x86#4797
feat: Enable gdb debugging on x86#4797JackThomson2 merged 4 commits intofirecracker-microvm:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4797 +/- ##
==========================================
- Coverage 84.38% 83.96% -0.43%
==========================================
Files 249 250 +1
Lines 27496 27758 +262
==========================================
+ Hits 23203 23306 +103
- Misses 4293 4452 +159
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ea73a87 to
a496d60
Compare
ShadowCurse
left a comment
There was a problem hiding this comment.
Please squash 1 and 2 commits.
roypat
left a comment
There was a problem hiding this comment.
I've had a very haphazard look at it. Mostly it's just nits about Rust style things. The one thing I'd like to discuss is the passing of Tids all over the place. I outlined in a comment how we might be able to avoid this. Could you have a look at that? :o
49973fb to
15d5537
Compare
15d5537 to
b006856
Compare
b006856 to
c689f40
Compare
5497cdc to
4b02872
Compare
roypat
left a comment
There was a problem hiding this comment.
Overall, looks good to me, good job! No concerns really, just a bunch of small things. I guess the biggest open question is how to deal with someone doing cargo build --feature gdb --target aarch64-unknown-linux-gnu. At least it should give a nice error message about that not being supported.
360a6fd to
0dc3bc8
Compare
964ccab to
4d022b2
Compare
Enabling GDB support for debugging the guest kernel. This allows us to connect a gdb server to firecracker and debug the guest. Signed-off-by: Jack Thomson <jackabt@amazon.com>
d9b94da to
b36cfff
Compare
Add documentation on how to use gdb with firecracker with examples on how to use the basic functionality to debug the guest kernel Signed-off-by: Jack Thomson <jackabt@amazon.com>
Adding a test to ensure that firecracker will build with the gdb flag enabled Signed-off-by: Jack Thomson <jackabt@amazon.com>
b36cfff to
2ab155f
Compare
This PR is adding GDB support into Firecracker. This is will allow us to connect GDB to the guest kernel and enable step through debugging.
This is achieved by leveraging https://github.com/daniel5151/gdbstub which allows us to debug the kernel over the GDB Remote Serial Protocol. The way this is managed is through a new GDB thread which is used to manage the interaction between the VCPUs and the GDB server.
A list of the current features supported in x86
The implementation is feature gated behind the
debugflag which aims to allow us to remove all the dependencies at compiletimeChanges
debugfeature to firecracker which when enabled will start the GDB server and block the boot until GDB connects and resumes the executionReason
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
PR.
CHANGELOG.md.TODOs link to an issue.contribution quality standards.
rust-vmm.