Truncate arrays if they are longer in recomp #79
Merged
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.
_match_array_elements
adds offset entities for each array variable. We need this if array entries are referenced by pointers in other variables becausedatacmp
only checks the database for a pointer match. (e.g.g_skBMap
andg_skeletonKickPhases
)This function assumes the arrays are the same size in orig as in recomp. This is not always true for
BETA10
and so the offsets we generate will clash with the ones from the following variable. We can detect when this occurs by looking at the next orig address. If recomp is larger, we add the extra offsets on the recomp side only and not link them to orig.You can use
roadmap --verbose
to see what changed. I'll attach theBETA10
diff here. No change toLEGO1
.truncate-array-roadmap-beta10.txt
IIRC the ghidra scripts do not reference these offsets and use the cvdump data directly to build out the types. Is that right @jonschz?