Skip to content
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

ARM support for GDB #4854

Merged

Conversation

JackThomson2
Copy link
Contributor

@JackThomson2 JackThomson2 commented Oct 15, 2024

Changes

Adding support for GDB debugging on arm machines.

Unfortunately KVM doesn't provide all the same API's we have to use on x86 so some parts have to be manually implemented. Some assumptions around Virtual Address configuration have been made to simplify the implementation.

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

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this
    PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 38.53659% with 126 lines in your changes missing coverage. Please review.

Project coverage is 84.07%. Comparing base (a320a51) to head (e57072f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/vmm/src/gdb/arch/aarch64.rs 38.53% 126 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4854      +/-   ##
==========================================
+ Coverage   84.05%   84.07%   +0.01%     
==========================================
  Files         251      251              
  Lines       28061    28052       -9     
==========================================
- Hits        23588    23586       -2     
+ Misses       4473     4466       -7     
Flag Coverage Δ
5.10-c5n.metal 84.71% <ø> (+0.03%) ⬆️
5.10-m5n.metal 84.69% <ø> (+0.02%) ⬆️
5.10-m6a.metal 83.99% <ø> (+0.02%) ⬆️
5.10-m6g.metal 80.70% <38.53%> (+0.02%) ⬆️
5.10-m6i.metal 84.69% <ø> (+0.03%) ⬆️
5.10-m7g.metal 80.70% <38.53%> (+0.02%) ⬆️
6.1-c5n.metal 84.70% <ø> (+0.02%) ⬆️
6.1-m5n.metal 84.69% <ø> (+0.02%) ⬆️
6.1-m6a.metal 84.00% <ø> (+0.02%) ⬆️
6.1-m6g.metal 80.70% <38.53%> (+0.02%) ⬆️
6.1-m6i.metal 84.69% <ø> (+0.03%) ⬆️
6.1-m7g.metal 80.70% <38.53%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JackThomson2 JackThomson2 force-pushed the feat/gdb_server_arm branch 5 times, most recently from a27a23c to 0ea83a8 Compare October 16, 2024 11:07
@JackThomson2 JackThomson2 marked this pull request as ready for review October 16, 2024 11:10
@JackThomson2 JackThomson2 force-pushed the feat/gdb_server_arm branch 2 times, most recently from 379c93f to ed1cfc0 Compare October 16, 2024 11:27
@JackThomson2 JackThomson2 added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Oct 16, 2024
docs/gdb-debugging.md Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/target.rs Outdated Show resolved Hide resolved
src/vmm/src/arch/aarch64/regs.rs Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Outdated Show resolved Hide resolved
src/vmm/src/gdb/arch/aarch64.rs Show resolved Hide resolved
@JackThomson2 JackThomson2 force-pushed the feat/gdb_server_arm branch 2 times, most recently from c3a56b7 to 4112696 Compare October 21, 2024 14:31
Add support for debugging aarch64 with gdb

Signed-off-by: Jack Thomson <jackabt@amazon.com>
Updated docs to now show arm is supported.
Updated the build test to run on aarch

Signed-off-by: Jack Thomson <jackabt@amazon.com>
@JackThomson2 JackThomson2 merged commit e2c787f into firecracker-microvm:main Oct 22, 2024
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants