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

Implement GDB server using gdbstub #164

Merged
merged 5 commits into from
Sep 17, 2021
Merged

Conversation

mkroening
Copy link
Member

@mkroening mkroening commented Aug 21, 2021

Fixes #122. Closes #50.

This reimplements the GDB server using gdbstub.

@codecov
Copy link

codecov bot commented Sep 6, 2021

Codecov Report

Merging #164 (06776ee) into master (9017584) will decrease coverage by 15.94%.
The diff coverage is 1.70%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #164       +/-   ##
===========================================
- Coverage   30.85%   14.91%   -15.95%     
===========================================
  Files          16       17        +1     
  Lines        4012     2635     -1377     
===========================================
- Hits         1238      393      -845     
+ Misses       2774     2242      -532     
Impacted Files Coverage Δ
src/arch/x86_64/registers/debug.rs 0.00% <0.00%> (ø)
src/bin/uhyve.rs 0.45% <0.00%> (ø)
src/lib.rs 10.82% <ø> (ø)
src/linux/gdb/breakpoints.rs 0.00% <0.00%> (ø)
src/linux/gdb/mod.rs 0.00% <0.00%> (ø)
src/linux/gdb/regs.rs 0.00% <0.00%> (ø)
src/linux/gdb/section_offsets.rs 0.00% <0.00%> (ø)
src/linux/mod.rs 0.00% <0.00%> (ø)
src/linux/vcpu.rs 0.00% <0.00%> (ø)
src/vm.rs 30.10% <ø> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9017584...06776ee. Read the comment docs.

bors bot added a commit that referenced this pull request Sep 7, 2021
186: Use concrete vCPU structs instead of trait objects r=jounathaen a=mkroening

In #164, I implement additional traits for `UhyveCPU` on linux, but not on macos.

To be able to use the trait impls, this makes the vCPU structs concrete instead of using trait objects.

Co-authored-by: Martin Kröning <mkroening@posteo.net>
@mkroening mkroening force-pushed the gdbstub branch 3 times, most recently from b579573 to 59e681b Compare September 7, 2021 14:15
@mkroening mkroening mentioned this pull request Sep 7, 2021
@mkroening mkroening force-pushed the gdbstub branch 2 times, most recently from dd73ba8 to 2980413 Compare September 7, 2021 14:47
bors bot added a commit that referenced this pull request Sep 7, 2021
188: Expose section offsets r=stlankes a=mkroening

Access to section offsets is necessary for debugging (#164).

Co-authored-by: Martin Kröning <mkroening@posteo.net>
@mkroening mkroening force-pushed the gdbstub branch 2 times, most recently from 5471167 to dfd35fb Compare September 9, 2021 14:44
@mkroening mkroening force-pushed the gdbstub branch 2 times, most recently from 6b7e8b3 to 7e6b5cb Compare September 9, 2021 14:50
@mkroening
Copy link
Member Author

This is ready for review now. 🎉

I'll tackle integration tests separately. Unit tests don't make much sense here, I think.

@mkroening mkroening marked this pull request as ready for review September 9, 2021 14:51
@mkroening mkroening changed the title [WIP] Implement GDB server using gdbstub Implement GDB server using gdbstub Sep 9, 2021
src/linux/mod.rs Outdated Show resolved Hide resolved
src/linux/vcpu.rs Outdated Show resolved Hide resolved
@mkroening
Copy link
Member Author

bors r=jounathaen

@bors bors bot merged commit d8f008d into hermit-os:master Sep 17, 2021
@mkroening mkroening deleted the gdbstub branch September 17, 2021 15:49
bors bot added a commit that referenced this pull request Sep 17, 2021
204: GDB: Correctly report stop reasons for watchpoints r=mkroening a=mkroening

This fixes watchpoints in GDB (an oversight from #164).

Found while working on integration tests, `@jounathaen.` ;)

bors r+

Co-authored-by: Martin Kröning <mkroening@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to gdbstub
1 participant