Пример #1
0
inline int idaapi request_attach_process(process_id_t pid, int event_id)                      { return callui(ui_dbg_request_attach_process, pid, event_id).i; }
Пример #2
0
inline int idaapi get_process_qty(void)                                                       { return callui(ui_dbg_get_process_qty).i; }
Пример #3
0
inline process_id_t idaapi get_process_info(int n, process_info_t *process_info)              { return (process_id_t)callui(ui_dbg_get_process_info, n, process_info).i; }
Пример #4
0
//--------------------------------------------------------------------------
int idaapi init(void)
{
  return ( callui(ui_get_hwnd).vptr != NULL || is_idaq() ) ? PLUGIN_OK : PLUGIN_SKIP;
}
Пример #5
0
inline bool idaapi exit_process(void)                                                         { return callui(ui_dbg_exit_process).cnd; }
Пример #6
0
inline thread_id_t idaapi getn_thread(int n)                                                  { return (thread_id_t)callui(ui_dbg_getn_thread, n).i; }
Пример #7
0
inline bool idaapi request_step_into(void)                                                    { return callui(ui_dbg_request_step_into).cnd; }
Пример #8
0
inline void idaapi clear_requests_queue(void)                                                 { callui(ui_dbg_clear_requests_queue); }
Пример #9
0
inline int idaapi get_process_state(void)                                                     { return callui(ui_dbg_get_process_state).i; }
Пример #10
0
inline ui_notification_t idaapi get_running_request(void)                                     { return (ui_notification_t)callui(ui_dbg_get_running_request).i; }
Пример #11
0
inline dbg_notification_t idaapi get_running_notification(void)                               { return (dbg_notification_t)callui(ui_dbg_get_running_notification).i; }
Пример #12
0
inline bool idaapi run_requests(void)                                                         { return callui(ui_dbg_run_requests).cnd; }
Пример #13
0
//--------------------------------------------------------------------------
//
//      The plugin method
//
//      This is the main function of plugin.
//
void idaapi run(int /*arg*/)
{
  char title[MAXSTR];
  // Let's display the functions called from the current one
  // or from the selected area

  // First we determine the working area

  func_item_iterator_t fii;
  bool ok;
  ea_t ea1, ea2;
  if ( callui(ui_readsel, &ea1, &ea2).cnd )    // the selection is present?
  {
    callui(ui_unmarksel);                      // unmark selection
    qsnprintf(title, sizeof(title), "Functions called from %08a..%08a", ea1, ea2);
    ok = fii.set_range(ea1, ea2);
  }
  else                                         // nothing is selected
  {
    func_t *pfn = get_func(get_screen_ea());   // try the current function
    if ( pfn == NULL )
    {
      warning("Please position the cursor on a function or select an area");
      return;
    }
    ok = fii.set(pfn);
    static const char str[] = "Functions called from ";
    char *ptr = qstpncpy(title, str, sizeof(title));
    get_func_name(pfn->startEA, ptr, sizeof(title)-(ptr-title));
  }

  // We are going to remember the call instruction addresses
  // in a netnode
  // altval(i) will contain the address of the call instruction

  netnode *node = new netnode;
  node->create();
  int counter = 0;
  while ( ok )
  {
    ea_t ea = fii.current();
    if ( is_call_insn(ea) )       // a call instruction is found
      node->altset(counter++, ea);//get_first_fcref_from(ea));
    ok = fii.next_code();
  }

  // altval(-1) will contain the number of pairs
  node->altset(-1, counter);

  // now open the window
  choose2(0,                    // non-modal window
          -1, -1, -1, -1,       // position is determined by the OS
          node,                 // pass the created netnode to the window
          qnumber(header),      // number of columns
          widths,               // widths of columns
          sizer,                // function that returns number of lines
          desc,                 // function that generates a line
          title,                // window title
          -1,                   // use the default icon for the window
          0,                    // position the cursor on the first line
          NULL,                 // "kill" callback
          NULL,                 // "new" callback
          NULL,                 // "update" callback
          NULL,                 // "edit" callback
          enter_cb,             // function to call when the user pressed Enter
          destroy_cb,           // function to call when the window is closed
          NULL,                 // use default popup menu items
          NULL);                // use the same icon for all lines
}
Пример #14
0
static HWND WINAPI getIdaHwnd(){ return((HWND)callui(ui_get_hwnd).vptr); }
Пример #15
0
inline bool idaapi request_detach_process(void)                                               { return callui(ui_dbg_request_detach_process).cnd; }
Пример #16
0
inline int idaapi request_start_process(const char *path, const char *args, const char *sdir) { return callui(ui_dbg_request_start_process, path, args, sdir).i; }
Пример #17
0
inline int idaapi get_thread_qty(void)                                                        { return callui(ui_dbg_get_thread_qty).i; }
Пример #18
0
inline bool idaapi request_suspend_process(void)                                              { return callui(ui_dbg_request_suspend_process).cnd; }
Пример #19
0
inline bool idaapi request_select_thread(thread_id_t tid)                                     { return callui(ui_dbg_request_select_thread, tid).cnd; }
Пример #20
0
inline bool idaapi request_continue_process(void)                                             { return callui(ui_dbg_request_continue_process).cnd; }
Пример #21
0
inline bool idaapi request_step_over(void)                                                    { return callui(ui_dbg_request_step_over).cnd; }
Пример #22
0
int
getIdaWindowHandle()
{
	return reinterpret_cast<int>(callui(ui_get_hwnd).vptr);
}