Пример #1
0
//--------------------------------------------------------------------------
int debmod_t::set_debug_names()
{
  name_info_t *ni = get_debug_names();
  if ( ni == NULL || ni->addrs.empty() )
    return 1;
  int code = send_debug_names_to_ida(ni->addrs.begin(), ni->names.begin(), (int)ni->addrs.size());
  clear_debug_names();
  return code;
}
Пример #2
0
//------------------------------------------------------------------------
//<inline(py_name)>
//------------------------------------------------------------------------
PyObject *get_debug_names(ea_t ea1, ea_t ea2)
{
  // Get debug names
  ea_name_vec_t names;
  PYW_GIL_CHECK_LOCKED_SCOPE();
  Py_BEGIN_ALLOW_THREADS;
  get_debug_names(&names, ea1, ea2);
  Py_END_ALLOW_THREADS;
  PyObject *dict = Py_BuildValue("{}");
  if ( dict != NULL )
  {
    for ( ea_name_vec_t::iterator it=names.begin(); it != names.end(); ++it )
    {
      PyDict_SetItem(dict,
                     Py_BuildValue(PY_BV_EA, bvea_t(it->ea)),
                     PyString_FromString(it->name.c_str()));
    }
  }
  return dict;
}