Closed fergofrog closed 1 year ago
Thanks for the feature request.
I tentatively suggest that we reopen issues like https://github.com/Vector35/binaryninja-api/issues/3211. That one is tracking a different issue than this one. This issue tracks the ability to manually specify an integer constant as an enum type, while #3211 seems to suggest we handle the enum better automatically. For example, we should be able to change the constant 2 to an enum name without user interaction in the following code:
100003ed8 enum foobar var_28
100003ed8 if (var_28 == 2)
100003ee8 _printf("foo3\n")
Related to #1703
This should be converted into several sub-tasks:
The second task is blocked on #3490
Resolved in builds >= 3.2.3974
Often when comparisons against enum members (or
#define
constants) are compiled they become staticmov r, val
where val is the constant. Currently binary ninja allows enum members to be set against data, but not when in code. Implementing this would make for a much tidier disassembly, all the way up to the MLIL.