Fixed the meta_path
used for the darwin platform to add the 64-bit variation of the shared object filename
#150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the plugin initializes its base namespace, it uses Python's
meta_path
to add a finder that allows the user to interact with the native IDA shared object using thectypes
library. This allows one to interact with the exports that IDA's API exposes to a user in the situation that the desired functionality is not exposed by the IDAPython SWIG interface.It was identified that the library on the "darwin" platfrom was incomplete and only included the path for the 32-bit version of IDA. This was due to an oversight by the author and was fixed by testing whether the 32-bit or 64-bit version of IDA is running and choosing the correct filename based on the detected version.
On the "darwin" platform, the 32-bit version of the library is "libida.dylib" and the 64-bit version of the library is "libida64.dylib". Similar to the way the internal is determined for the other platforms, the value for
idaapi.BADADDR
is checked and used to determine whether to add the "64" suffix or not. The "linux" platform was also updated to useidaapi.idadir
to determine the installation directory and locate the correct native library.This fixes issue #149.