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.
I've seen in previous pull requests that this version of xv6 is not maintained really anymore, however, my school used this repository as the central point of study in our class, and during one of my HW assignments regarding modifying the filesystem, it would have been useful to have a hexdump tool.
In contrast to programs like cat and wc that have good utility within code (no need to sanitize outputs), since this tool is mostly human in necessity (after all, if you just want the raw binary of the file, then just open and read it). It has niceties and formatting to make using it a decent experience (not too over the board I think). I've bug-tested it fairly well by screwing around with ASCII & Binary files (you can even read elf files of course, so it's fun to take a look at "7F 45 4C 46" etc.)
This tool lets you read multiple files if you want (sequentially, but idk why you would do that), and only prints 16 lines at a time (hit enter to continue).
If this is something that you think would benefit others as well, then awesome, if you would rather I also/instead consider the RISC-V repo, then I can do that too.