PPCSymbolDB: Refactor SymbolMap Save/Load #13195
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors parts of the loading/saving process of symbol map. I'm putting it as a draft for now as I'd like to wait for https://dolp.in/pr13113 to be merged first.
This PR fixes issues I had where some symbols weren't loaded properly (which might get saved later). Here are some examples on how they can alter existing symbol maps.
The alignment wasn't properly detected and
0
was detected asname
bysscanf
.This issue was also caused by the
namepos
/strstr
logic which is flawed when the name is small and equals to part of the symbol address, size of vaddress. Moreover, checking for a space doesn't work when alignment is 16. I've seen this alignment value on some*fill*
symbols.savegpr / loadgpr entry wasn't properly detected
This issue also trimmed the object names after the "entry of" part.
This PR is ready to be reviewed and tested. I also advise people testing PR to backup their symbol maps just in case or test this PR in a dedicated portable build.