Add measured offsets for known mono builds - #143
Open
ero-qt wants to merge 7 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on #142.
attach_auto_detectnow reads the mono module's debug identity first. A known build attaches with its measured offsets and skips version detection entirely. Anything else falls back to the existing detection, unchanged.attach(version)is untouched, so an explicitly passed version keeps meaning what it means. On successful attach a log line names the identity, known or not, so unknown builds can be collected.The table carries 26 builds from Unity 5.6 through 6000.7 at both pointer sizes, measured from the runtimes' own PDBs. Each entry states its provenance. GUIDs are written canonically and a
const fnparses them into storage order at compile time, so a malformed one fails the build.One finding from the measured data: every 2021.2+ x64 build places
MonoVTable's method table at 0x48. The current table uses 0x40 there, which would misplace static field reads on those games. The entries carry the measured value and the existing table is left as is here.Assembly names are read through the image when a build's offsets locate them there.
ClassOffsets.imagehad no readers and is removed.