I was not able to find an API function to get the CPU architecture of the loaded binary.
In idaapi.py
, there is a function def set_processor_type(*args)
but no equivalent such as get_processor_type
.
I don't want to fall back to running some additional (python) tool such as file, readelf or a python ELF parser. I also don't like the idea of parsing the strings displayed at the beginning of the IDA assembly listing.
There must be a way to use idc.py
, idaapi.py
or idautils.py
for this.