Skip to content
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

Debugger: Add settings to control the symbol analysis passes #11901

Merged
merged 5 commits into from
Oct 18, 2024

Conversation

chaoticgd
Copy link
Contributor

@chaoticgd chaoticgd commented Oct 9, 2024

Description of Changes

This adds settings to control what and when analysis passes get run, as well as a new option in the debugger to re-run analysis on demand. This is the sequel to this PR.

The default behaviour is now to only run the analysis passes if the user opens the debugger. I think this is a lot saner than the previous behaviour, and can save on the order of 100MB of memory if the user wants to play a .mdebug game without opening the debugger.

As part of this I ended up rewriting some of the analysis passes. Most notably the function hashing system is now a lot smarter in determining when it should hash functions. Previously it would hash all the functions multiple times a second if the debugger was open (whoops!). Now it just hashes the ones that have currently visible symbol tree nodes once a second. Maybe this could've been a separate PR, but I think it's okay to include it.

Screenshots:

Screenshot_20241016_185253
Screenshot_20241016_223906
Screenshot_20241016_192809

Rationale behind Changes

Give the user more control over how symbols are loaded. The function scanning options should be especially useful for use with games that load their own code at runtime, for example.

Give the GS dump tab a friend.

Suggested Testing Steps

Try running analysis on a bunch of games with and without symbols, testing different options in the analysis dialog, the global settings dialog, and the per-game settings dialog.

@chaoticgd chaoticgd force-pushed the symbol_table_settings branch 2 times, most recently from cd5aa99 to 7fe2ddf Compare October 16, 2024 00:22
@github-actions github-actions bot added the Dependencies Pull requests that update a dependency file label Oct 16, 2024
@chaoticgd chaoticgd force-pushed the symbol_table_settings branch from 7fe2ddf to b030b84 Compare October 16, 2024 17:35
@chaoticgd chaoticgd marked this pull request as ready for review October 16, 2024 17:57
@chaoticgd chaoticgd force-pushed the symbol_table_settings branch from b030b84 to cad2c72 Compare October 16, 2024 21:12
@chaoticgd chaoticgd force-pushed the symbol_table_settings branch from cad2c72 to 3ba96f4 Compare October 16, 2024 21:32
Copy link
Member

@F0bes F0bes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. Can't get it to crash.

pcsx2/DebugTools/DebugInterface.h Show resolved Hide resolved
@F0bes F0bes merged commit f77bf1e into PCSX2:master Oct 18, 2024
12 checks passed
@chaoticgd chaoticgd deleted the symbol_table_settings branch October 18, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build | Project System Debugger Dependencies Pull requests that update a dependency file GUI/Qt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants