feat(shell): add hexdump command for hex + ASCII memory views - #114
Open
kudasaixc wants to merge 1 commit into
Open
feat(shell): add hexdump command for hex + ASCII memory views#114kudasaixc wants to merge 1 commit into
kudasaixc wants to merge 1 commit into
Conversation
hexdump <hex address> <length> dumps a memory range as a classic offset / hex / ASCII table, 16 bytes per row. It complements peek (single byte) and memdump (PMM bitmap) with the memory view you actually want when inspecting the heap, page tables or the VGA buffer. Reuses htoi for the address, atoi for the length, and the terminal print helpers. Example: hexdump B8000 48 shows the VGA text buffer.
im-nymii
self-requested a review
July 28, 2026 13:51
Member
|
Hi, We prefer using the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a hexdump command to the shell.
usage: hexdump
It dumps a memory range as the classic offset / hex / ASCII table, 16 bytes per row. peek only reads a single byte and memdump only shows the PMM bitmap, so this fills the gap: the view you actually want when looking at the heap, the page tables or the VGA buffer.
The address is parsed with htoi (hex) and the length with atoi (decimal), reusing the existing helpers, plus terminal_print_hex for the offset column and a small print_hex_byte helper for the byte column. Like peek, mia and crash it trusts its input (no address validation), same as the other debug commands here.
Built and tested locally with the CI setup (Zig 0.16.0 + NASM, USE_ZIG path) and run in QEMU with AURI_TEST_MODE:
That dump is the VGA text buffer, so the ASCII column shows the prompt text with the attribute bytes rendering as dots.