-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Request] Trace Log Implementation #7389
Comments
Logging every instruction (when hundreds of millions can be run per second) would generate a /very/ large file and make the emulator /very/ slow. We do have some options (in the code) to output code being compiled by the jit (so only the first time it's seen), but this will typically be very confusing for people trying to look for a trace - it would basically have missing sections. We do now have the ability to set breakpoints with custom logging. So for example, you could add a breakpoint to the beginning of a function with "MyFunc({a0},{a1},{a2})" as the log message. Then it would log every call to that function. Note also that we have other features that can help in this area;
I think a full assembly trace log is impractical, though, as noted above. -[Unknown] |
Quick note - I've started creating a WebSocket API to enable remote debugging. Once done, you could write some code to use stepping and create a log like this. See #10909 for more details. While I still think a full assembly log is impractical, this would make it a lot easier to do this in your own code. -[Unknown] |
I'm going to close this now - as noted, you could theoretically implement a trace log now by setting breakpoints or stepping using the API. -[Unknown] |
An option (on/off toggle found on the debugger) to create a text file that will log all assembly execution (w/ optional registers display) up until the option is toggled off. You should be have the ability to alter the file name of the output file from within the gui. Output format per line would be:
[Address] [Instruction Bytes] [Instruction Literal] [Optional Register Display]
Example:
This feature would be very beneficial to hackers as they can manually back trace through the log along the game's execution path in reverse from a breakpoint location with ease. Trace logs can also be compared to show differences in execution path between them, which is very useful for exposing harder to find hacks that are based on random chance.
The text was updated successfully, but these errors were encountered: