Пример #1
0
//--------------------------------------------------------------------------
int rpc_debmod_t::dbg_continue_after_event(const debug_event_t *event)
{
  qstring cmd = prepare_rpc_packet(RPC_CONTINUE_AFTER_EVENT);
  append_debug_event(cmd, event);

  return process_long(cmd);
}
Пример #2
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_continue_after_event(const debug_event_t *event)
{
  bytevec_t req = prepare_rpc_packet(RPC_CONTINUE_AFTER_EVENT);
  append_debug_event(req, event);

  return process_long(req);
}
Пример #3
0
//--------------------------------------------------------------------------
int rpc_debmod_t::getint2(uchar code, int x)
{
  bytevec_t req = prepare_rpc_packet(code);
  append_dd(req, x);

  return process_long(req);
}
Пример #4
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_eval_lowcnd(thid_t tid, ea_t ea)
{
  bytevec_t req = prepare_rpc_packet(RPC_EVAL_LOWCND);
  append_dd(req, tid);
  append_ea64(req, ea);
  return process_long(req);
}
Пример #5
0
//--------------------------------------------------------------------------
int rpc_debmod_t::getint2(uchar code, int x)
{
  qstring cmd = prepare_rpc_packet(code);
  append_long(cmd, x);

  return process_long(cmd);
}
Пример #6
0
//--------------------------------------------------------------------------
int rpc_debmod_t::dbg_attach_process(pid_t pid, int event_id)
{
  qstring cmd = prepare_rpc_packet(RPC_ATTACH_PROCESS);
  append_long(cmd, pid);
  append_long(cmd, event_id);

  return process_long(cmd);
}
Пример #7
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_is_ok_bpt(bpttype_t type, ea_t ea, int len)
{
  bytevec_t req = prepare_rpc_packet(RPC_ISOK_BPT);
  append_dd(req, type);
  append_ea64(req, ea);
  append_dd(req, len+1);

  return process_long(req);
}
Пример #8
0
//--------------------------------------------------------------------------
int rpc_debmod_t::dbg_del_bpt(ea_t ea, const uchar *orig_bytes, int len)
{
  qstring cmd = prepare_rpc_packet(RPC_DEL_BPT);
  append_ea(cmd, ea);
  append_long(cmd, len);
  append_memory(cmd, orig_bytes, len);

  return process_long(cmd);
}
Пример #9
0
//--------------------------------------------------------------------------
ssize_t idaapi rpc_debmod_t::dbg_write_memory(ea_t ea, const void *buffer, size_t size)
{
  bytevec_t req = prepare_rpc_packet(RPC_WRITE_MEMORY);
  append_ea64(req, ea);
  append_dd(req, (uint32)size);
  append_memory(req, buffer, size);

  return process_long(req);
}
Пример #10
0
//--------------------------------------------------------------------------
ssize_t rpc_debmod_t::dbg_write_memory(ea_t ea, const void *buffer, size_t size)
{
  qstring cmd = prepare_rpc_packet(RPC_WRITE_MEMORY);
  append_ea(cmd, ea);
  append_long(cmd, (uint32)size);
  append_memory(cmd, buffer, size);

  return process_long(cmd);
}
Пример #11
0
//--------------------------------------------------------------------------
int rpc_debmod_t::dbg_thread_write_register(thid_t tid, int reg_idx, const regval_t *value)
{
  qstring cmd = prepare_rpc_packet(RPC_WRITE_REG);
  append_long(cmd, tid);
  append_long(cmd, reg_idx);
  append_regvals(cmd, value, 1);

  return process_long(cmd);
}
Пример #12
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_write_register(thid_t tid, int reg_idx, const regval_t *value)
{
  bytevec_t req = prepare_rpc_packet(RPC_WRITE_REG);
  append_dd(req, tid);
  append_dd(req, reg_idx);
  append_regvals(req, value, 1, NULL);

  return process_long(req);
}
Пример #13
0
//--------------------------------------------------------------------------
int rpc_debmod_t::bpt(uchar code, bpttype_t type, ea_t ea, int len)
{
  qstring cmd = prepare_rpc_packet(code);
  append_long(cmd, type);
  append_ea(cmd, ea);
  append_long(cmd, len);

  return process_long(cmd);
}
Пример #14
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_init(bool _debug_debugger)
{
  has_pending_event = false;
  poll_debug_events = false;

  bytevec_t req = prepare_rpc_packet(RPC_INIT);
  append_dd(req, debugger.flags);
  append_dd(req, _debug_debugger);

  return process_long(req);
}
Пример #15
0
//--------------------------------------------------------------------------
int rpc_debmod_t::dbg_start_process(
  const char *path,
  const char *args,
  const char *startdir,
  int flags,
  const char *input_path,
  uint32 input_file_crc32)
{
  qstring cmd = prepare_rpc_packet(RPC_START_PROCESS);
  append_str(cmd, path);
  append_str(cmd, args);
  append_str(cmd, startdir);
  append_long(cmd, flags);
  append_str(cmd, input_path);
  append_long(cmd, input_file_crc32);

  return process_long(cmd);
}
Пример #16
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_update_lowcnds(const lowcnd_t *lowcnds, int nlowcnds)
{
  ea_t ea = 0;
  bytevec_t req = prepare_rpc_packet(RPC_UPDATE_LOWCNDS);
  append_dd(req, nlowcnds);
  const lowcnd_t *lc = lowcnds;
  for ( int i=0; i < nlowcnds; i++, lc++ )
  {
    append_ea64(req, lc->ea-ea); ea = lc->ea;
    append_str(req, lc->cndbody);
    if ( !lc->cndbody.empty() )
    {
      append_dd(req, lc->type);
      if ( lc->type != BPT_SOFT )
        append_dd(req, lc->size);
      append_db(req, lc->orgbytes.size());
      append_memory(req, lc->orgbytes.begin(), lc->orgbytes.size());
      append_ea64(req, lc->cmd.ea);
      if ( lc->cmd.ea != BADADDR )
        append_memory(req, &lc->cmd, sizeof(lc->cmd));
    }
  }
  return process_long(req);
}
Пример #17
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_cleanup_appcall(thid_t tid)
{
  bytevec_t req = prepare_rpc_packet(RPC_CLEANUP_APPCALL);
  append_dd(req, tid);
  return process_long(req);
}
Пример #18
0
//--------------------------------------------------------------------------
int idaapi rpc_debmod_t::dbg_rexec(const char *cmdline)
{
  bytevec_t req = prepare_rpc_packet(RPC_REXEC);
  append_str(req, cmdline);
  return process_long(req);
}
Пример #19
0
//--------------------------------------------------------------------------
int rpc_debmod_t::dbg_cleanup_appcall(thid_t tid)
{
  qstring cmd = prepare_rpc_packet(RPC_CLEANUP_APPCALL);
  append_long(cmd, tid);
  return process_long(cmd);
}