1

I'm writing a plugin which is available at all times (PLUGIN_FIX flag). However, I also need to be notified when a database is created or opened, as if I would handle the moment when init() is called on plugins without the PLUGIN_FIX flag.

I looked into the IDA 7.0 SDK, but I only found idb_event::closebase, and I need the exact opposite. idb_event::savebase also doesn't really match.

I logged all events in the SDK ever raised by IDA (causing IDA to run slower than my grandma ☺), and only dug out idb_event::kernel_config_loaded which happens around the moment I want to catch. However, it also triggers at other times (like when simply clicking the "Open" button), so it's not a match too.

Am I missing something here? Such an event seems quite important to me, so I'm a bit surprised there's nothing "obvious" for it.

2

After looking around a bit more, I noticed that if I handle the following two processor module (HT_IDP) events, I can pretty much catch the moment I wanted:

  • processor_t::event_t::ev_newfile when a new database is being created (like from a PE file)
  • processor_t::event_t::ev_oldfile when an existing database has been loaded (from a .idb file)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.