Each version of IDA has several entry points:
idaq
idaq64
idal
idal64
Currently, we are always choosing idaq64. We should provide a command line interface, that will allow a user to choose the version that suits his needs better.
Proposed interface. Add the following options:
--ida-mode=[32|64|auto] # defaults to auto
--ida-headless=[true|false|auto] # defaults to auto
--ida-version=[set-of-available-versions] # e.g., 6.9
--ida-path[s]=
If mode 32 is specified, then idaq or idal is chosen (depending on the headless parameter). If 64 is specified, then idaq64 or idal64 is used. Otherwise a proper version should be chosen using the algorithm described below (it was actually implemented previously, so all the needed code is still available):
If a user created db is available, then an IDA that can load this db should be chosen. otherwise idaq64 is chosen. The paths parameter allows to add new paths without recompilation or reinstallation. This will bypass the invariants of opam, but they still can be bypassed so it is not a big loss. The path option should be clever, it should check whether ida-python plugins are installed in the newly added path, and if it is not, then it should not accept the path and emit an error message:
Error: IDA integration plugin is not installed under the specified path:
opam upgrade bap-ida
or copy
them manually.
The version option should be choose a version of IDA from a set of options specified at configuration time, or later via the path parameter.
Comments