Files
reverse-engineering-anything/docs/guides/native
Lewis WangandClaude Opus 5.5 94c1c6aec0 fix(native): decode Objective-C categories that Swift lists in __objc_catlist2 (#14025)
* fix(native): decode Objective-C categories that Swift lists in __objc_catlist2

Swift lists categories on a class it reaches through a Swift class stub
in __objc_catlist2, and the Objective-C runtime loads that list like
__objc_catlist. inspect_native_dispatch_metadata read only __objc_catlist,
so these categories, their methods and protocols were missing while
objc_properties_categories coverage reported complete.

Read both lists. A stub's first word is a plain value from 1 to 15, as
the runtime's isStubClass checks, and it holds no class_t, so a category
whose class reference is a stub keeps a null class and coverage names
the reference instead of reading unrelated bytes as a class name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(native): version the dispatch reader profile for __objc_catlist2 categories

Reading __objc_catlist2 changes inspect_native_dispatch_metadata results,
but the reader still declared apple-metadata-reader-4, so a snapshot saved
before this change matched the current profile and replayed its empty,
complete category result. Declare reader version and revision 5 so those
snapshots are refused with a binding mismatch and the image is read again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 10:25:48 -05:00
..