-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: Enable gdb debugging on x86 #4797
feat: Enable gdb debugging on x86 #4797
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
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.
Please squash 1 and 2 commits.
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.
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 Tid
s 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
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.
LGTM
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.
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
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.
doc LGTM
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
debug
flag which aims to allow us to remove all the dependencies at compiletimeChanges
debug
feature 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
.TODO
s link to an issue.contribution quality standards.
rust-vmm
.