- Add a write_mem counterpart to read_mem to handle writes to MMIO.
- Add support for the GDB 'M' packet to write bytes to the guest's memory. For MMIO writes, attempt to batch writes up into words. This is imprecise, but if you write a single 2 or 4-byte aligned word, it should be treated as a single MMIO write operation.
- While here, tidy up the parsing of the 'm' command used for reading memory to match 'M'.
Details
Details
- Reviewers
scottph markj - Group Reviewers
bhyve - Commits
- rS348212: Add support for writing to guest memory in the debug server.
- gdb tried to use this early on to set breakpoints
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 24304 Build 23127: arc lint + arc unit
Event Timeline
Comment Actions
gdb_read_mem and gdb_write_mem could conceivably be factored together, though I'm not sure the complexity of that would be worth it. With or without that, this patch looks good to me.
Comment Actions
I did consider merging the read and write mem functions, but I was worried it might be a bit messy. I might still try it as a followup and see how it looks.
usr.sbin/bhyve/gdb.c | ||
---|---|---|
887 | Extra ws after ==, ditto below. |