summaryrefslogtreecommitdiff
path: root/objectivec/objc.cpp
AgeCommit message (Collapse)Author
2025-05-13Mark Objective-C metadata-derived symbols as local instead of exported.kat
2025-05-09[ObjC] Remove shared cache prefix on a log callMason Reed
2025-05-09[ObjC] Retrieve category's class name when class is an external symbolMark Rowe
This also updates the symbol names that are generated when the name cannot be found to include the address in hex rather than decimal so it's easier to navigate to.
2025-04-08[ObjC] Handle Objective-C ivars with an offset of 0Mark Rowe
objc-runtime-new.mm mentions an offset of 0 is used for anonymous bitfields. Previously this would throw an exception when attempting to read from offset 0 and the types would not be applied.
2025-04-08Remove notion of image name from objective-c processorMason Reed
This made the macho objective-c processor aware of images and was passed around everywhere, instead we have an overridable section getter that gives the control over the section retrieval to the derived processor. In the case of shared cache this means we can store the image to be processed and then use the header to locate the relevant sections. Fixes: https://github.com/Vector35/binaryninja-api/issues/6594
2025-04-03Change warning to info for undetermined base class for objective-c categoryMason Reed
More informative than a warning
2025-04-03[SharedCache] Fix detection of the class name of categoriesMark Rowe
The logic for determining the class name of a category did not correctly handle classes defined in other images in the shared cache. There were two problems: 1. If the class is defined in another image that is already loaded, `ObjCProcessor` has already renamed the symbol from `_OBJC_CLASS_$_` to `cls_`. Both forms of symbol name are now handled. 2. If the class is defined in an image that is not yet loaded, no symbol name is available. The category's class is now looked up in the shared cache symbol table, and the symbol's name is parsed as if it were an import symbol. This fixes almost all cases of "Failed to determine base classname for category" that I have come across. Mason Reed: Fixed up to make objective-c processor always consult GetSymbol
2025-04-02Remove ObjC todos which shouldnt be doneMason Reed
See: https://github.com/Vector35/binaryninja-api/pull/6540/files#r2020882071
2025-04-02[SharedCache] Fix some bugsMason Reed
2025-04-02[SharedCache] Refactor Shared CacheMason Reed
In absence of a better name, this commit refactors the shared cache code.
2025-04-02[ObjC] Create a shared ObjC processor for Macho and DSC viewsWeiN76LQh
Both the Macho and DSC views need to process Objective-C but have separate processor classes. It would appear that the DSC version was largely a copy and paste of the Macho view one, with some modifications. The majority of code overlaps between the 2 so it doesn't make sense to maintain 2 and copy and paste improvements/fixes between them. This commit fixes that by creating a base Objective-C processor that contains the shared code. View specific code is implemented in the respective subclasses for the views. Although there is very little view specific code for each.