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

Merged
merged 1 commit into from
Jan 20, 2025

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 2 times, most recently from 609d3be to 03339d8 Compare January 16, 2025 16:30
@chaoticgd chaoticgd marked this pull request as ready for review January 16, 2025 17:18
@chaoticgd chaoticgd force-pushed the scan_from_memory_fix branch from 03339d8 to 690c6dc Compare January 16, 2025 19:04
@F0bes F0bes merged commit a930daf into PCSX2:master Jan 20, 2025
12 checks passed
@chaoticgd chaoticgd deleted the scan_from_memory_fix branch January 20, 2025 23:16
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.

2 participants