-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add an option to produce a textfile trace of instructions executed #39
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
- Coverage 27.40% 27.31% -0.10%
==========================================
Files 42 44 +2
Lines 9014 9055 +41
==========================================
+ Hits 2470 2473 +3
- Misses 6544 6582 +38 ☔ View full report in Codecov by Sentry. |
I wanted to avoid a |
fn handle(&mut self, trace: &CpuTrace) { | ||
self | ||
.file | ||
.write_all(format!("{:04X}: {:02X}\n", trace.address, trace.opcode).as_bytes()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be good to make this buffered with BufWriter
, i'm happy to implement that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I can implement buffering for the trace but otherwise LGTM!
waiting until we add support for buffering
Rebased on top of main to include changes from #40 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Useful for debugging.
Adds infrastructure as well in case we want to make the trace more detailed in the future, make other kinds of trace handlers, etc.