Improve our logging.#246
Conversation
This pull-request updates how our logging is handled, and makes a proof of concept update to S_FIRST and S_NEXT to make it live.
|
Quite happy with this now; most of the file I/O functions log useful information:
The noisy-logging in the past is now gone away, and I can see only a single line of output per BDOS syscall. We've lost the "simple" debugging, which I'm in two minds about, but I think on balance it's an okay trade-off to make. I rejigged the random-record handling a little which is out of scope really, but made sense to centralize it when I was touching related code. |
|
I hit submit too soon! The single outstanding problem I see is that I log CPU registers before and after the syscall, but the "after" values are wrong. In the BDOS handlers I set HL and rely upon the z80 assembly code I've setup in RAM to propagate the values to B/A registers. But that happens after the return from the golang code, when we're back inside the emulator. I guess I need to setup the return values more manually, and remove the setting Z80 assembly code I have: |
This pull-request updates how our logging is handled, and makes a proof of concept update to S_FIRST and S_NEXT to make it live.
Once complete this will close #245:
logfield to thecpmobject.This results in something like this being logged:
Or more neatly:
In short we have one log-line for each syscall, and we have nicely broken down fields. We need to update all the syscalls to follow this approach though which is why this is only a proof of concept.
TODO, before merging