Is there any built-in mechanism to specify custom conventions that will be used when parsing data in TypeManager.create_type_from_dict/create_type_from_file?
Say, I've got the following file
Syntax: Select all
[function]
# CTFGameRules::GetPayloadToBlock
[[get_payload_to_block]]
identifier_windows =
identifier_linux = _ZNK12CTFGameRules17GetPayloadToBlockEi
convention = MY_CALLING_CONVENTION
arguments_windows = POINTER, INT
arguments_linux = POINTER, POINTER, INT
I'd like to pass somewhere a dict like
Syntax: Select all
{'MY_CALLING_CONVENTION': MyCallingConvention}
to get the function built with that convention.
So far the only possibility I've found is to:
1. Subclass memory.helpers.Key and override its as_convention method;
2. Subclass memory.manager.TypeManager and override its create_type_from_dict method so that it will use my own Key class instead of the stock one.
But create_type_from_dict is way too big. Copy-pasting it only to replace all Key occurrences seems dumb to me.