Skip to content

Commit

Permalink
Add support for older IDA versions (7.0 - 7.4). (#15)
Browse files Browse the repository at this point in the history
* Add support for older IDA versions (7.0 - 7.4).

Signed-off-by: Dominik Bayerl <[email protected]>

* Bugfix.
- term-Callback must be nullptr for PLUGIN_MULTI plugins
- run-Callback must be nullptr for PLUGIN_MULTI plugins

Signed-off-by: Dominik Bayerl <[email protected]>

* Remove unrelated change

---------

Signed-off-by: Dominik Bayerl <[email protected]>
Co-authored-by: Riccardo Mori <[email protected]>
  • Loading branch information
dominikbayerl and patacca authored Jul 6, 2023
1 parent 795b6ad commit c2e1a13
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Quokka.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,37 @@ void idaapi PluginTerminate() {

} // namespace quokka

#if IDA_SDK_VERSION > 740
static plugmod_t* idaapi init() { return new quokka::plugin_ctx_t; }
#else
int idaapi init(void) {
quokka::PluginInit();
return PLUGIN_KEEP;
}

void idaapi term(void)
{
quokka::PluginTerminate();
}

bool idaapi run(size_t args) {
return quokka::PluginRun(args);
};
#endif

plugin_t PLUGIN{
IDP_INTERFACE_VERSION,
#if IDA_SDK_VERSION > 740
PLUGIN_UNL | PLUGIN_MULTI,
init,
nullptr,
nullptr,
#else
PLUGIN_UNL,
init,
term,
run,
#endif
"This module exports binary",
"Quokka help",
"Quokka",
Expand Down

0 comments on commit c2e1a13

Please sign in to comment.