idd.i: added dbg_get_name() to get the current debugger's name

This commit is contained in:
elias.bachaalany 2010-05-05 13:11:36 +00:00
parent ff7ab3f1dc
commit 69e35391a5
2 changed files with 25 additions and 18 deletions

View File

@ -15,7 +15,7 @@ typedef struct
%{ %{
//<code(py_dbg)> //<code(py_dbg)>
PyObject *meminfo_vec_t_to_py(meminfo_vec_t &areas); static PyObject *meminfo_vec_t_to_py(meminfo_vec_t &areas);
//</code(py_dbg)> //</code(py_dbg)>
%} %}
@ -23,7 +23,7 @@ PyObject *meminfo_vec_t_to_py(meminfo_vec_t &areas);
//<inline(py_dbg)> //<inline(py_dbg)>
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
PyObject *py_get_manual_regions() static PyObject *py_get_manual_regions()
{ {
meminfo_vec_t areas; meminfo_vec_t areas;
get_manual_regions(&areas); get_manual_regions(&areas);
@ -31,7 +31,7 @@ PyObject *py_get_manual_regions()
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
PyObject *refresh_debugger_memory() static PyObject *refresh_debugger_memory()
{ {
invalidate_dbgmem_config(); invalidate_dbgmem_config();
invalidate_dbgmem_contents(BADADDR, BADADDR); invalidate_dbgmem_contents(BADADDR, BADADDR);

View File

@ -12,7 +12,7 @@
//<code(py_idd)> //<code(py_idd)>
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
bool dbg_can_query() static bool dbg_can_query()
{ {
// Reject the request only if no debugger is set // Reject the request only if no debugger is set
// or the debugger cannot be queried while not in suspended state // or the debugger cannot be queried while not in suspended state
@ -20,7 +20,7 @@ bool dbg_can_query()
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
PyObject *meminfo_vec_t_to_py(meminfo_vec_t &areas) static PyObject *meminfo_vec_t_to_py(meminfo_vec_t &areas)
{ {
PyObject *py_list = PyList_New(areas.size()); PyObject *py_list = PyList_New(areas.size());
meminfo_vec_t::const_iterator it, it_end(areas.end()); meminfo_vec_t::const_iterator it, it_end(areas.end());
@ -300,7 +300,14 @@ PyObject *dbg_read_memory(PyObject *py_ea, PyObject *py_sz);
PyObject *dbg_get_thread_sreg_base(PyObject *py_tid, PyObject *py_sreg_value); PyObject *dbg_get_thread_sreg_base(PyObject *py_tid, PyObject *py_sreg_value);
PyObject *dbg_get_registers(); PyObject *dbg_get_registers();
PyObject *dbg_get_memory_info(); PyObject *dbg_get_memory_info();
bool dbg_can_query(); static PyObject *dbg_get_name()
{
if ( dbg == NULL )
Py_RETURN_NONE;
return PyString_FromString(dbg->name);
}
static bool dbg_can_query();
PyObject *py_appcall( PyObject *py_appcall(
ea_t func_ea, ea_t func_ea,
thid_t tid, thid_t tid,