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: Wait for the entry point to run before scanning from memory #12195

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chaoticgd
Copy link
Contributor

@chaoticgd chaoticgd commented Jan 14, 2025

Description of Changes

The symbol importer thread will now wait for the entry point to run before scanning for functions from memory.

I've used std::condition_variable to implement it so hopefully there won't be any deadlock issues this time.

Rationale behind Changes

When I modified the function scanner to scan the ELF file, I removed the code to sync the symbol importer thread with the CPU thread because it was broken, but when I reintroduced support for scanning from memory I forgot to reintroduce it.

Previously this meant that if the Scan From Memory option was selected from the global or per-game settings dialogs (not from the analysis options dialog in the debugger as that won't affect boot) the function scanner could run before the game's code was actually loaded in memory. This could be fixed by doing another analysis run, which if you've selected the Scan From Memory option is probably what you want to do anyway, but it's still good to fix this.

Suggested Testing Steps

Perform a bunch of operations that change the VM state e.g. rebooting, loading/saving save states, etc.

@chaoticgd chaoticgd force-pushed the scan_from_memory_fix branch from a5b83ef to 609d3be Compare January 14, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant