This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Description
Given some code like this:
33| v28 = a3;
34| v27 = objc_retain(CFSTR("/Library/MobileSubstrate/DynamicLibraries/libFLEX.dylib"));
35| v3 = objc_msgSend(&OBJC_CLASS___NSFileManager, "defaultManager");
36| v26 = (void *)objc_retainAutoreleasedReturnValue(v3);
with the cursor right here (column 38 in the code above) for example:
v
OBJC_CLASS__|_NSFileManager
funcEA = ...
line = 35
cursor = 38
item = fidl.lex_citem_at_pos(funcEA, line, cursor)
# Prints obj
item.cexpr.opname
# Prints address of _OBJC_CLASS_$_NSFileManager
item.cexpr.obj_ea
The explicit cursor position is important to me as I'm not working directly in IDA; I would like to be able to query arbitrary locations without using IDA's cursor API.