IDAPython for IDA 8.0

This commit is contained in:
Arnaud Diederen
2022-08-22 10:14:08 +02:00
parent 1e0b352e00
commit 023c5ba53c
108 changed files with 38145 additions and 32850 deletions
+3 -3
View File
@@ -2,13 +2,13 @@
"SwigDirector_dirspec_t::get_name" : [
("repl_text", (
"int swig_res = SWIG_AsVal_bool(result, &swig_val);",
("int swig_res = IDAPyStr_Check(result) && (out == nullptr || IDAPyStr_AsUTF8(out, result));",
("int swig_res = PyUnicode_Check(result) && (out == nullptr || PyUnicode_as_qstring(out, result));",
" swig_val = static_cast<bool>(swig_res);"))),
("director_method_call_arity_cap", (
True, # add GIL lock
"get_name",
"(method ,(PyObject *)obj0,(__argcnt < 2 ? NULL : (PyObject *)obj1), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(__argcnt < 3 ? NULL : (PyObject *)obj1), NULL)",
"(method ,(PyObject *)obj0,(__argcnt < 2 ? nullptr : (PyObject *)obj1), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(__argcnt < 3 ? nullptr : (PyObject *)obj1), nullptr)",
)),
("spontaneous_callback_call", (
False, # add GIL lock
+4 -4
View File
@@ -3,10 +3,10 @@
("repl_text", (
"int swig_res = SWIG_AsVal_bool(result, &swig_val);",
(
"const bool is_error = IDAPyStr_Check(result) != 0;",
"const bool is_error = PyUnicode_Check(result) != 0;",
" int swig_res = is_error || result == Py_None;",
" if ( is_error )",
" IDAPyStr_AsUTF8(errbuf, result);",
" PyUnicode_as_qstring(errbuf, result);",
" swig_val = !is_error;",
),
)),
@@ -18,13 +18,13 @@
("""const bool is_proper_tuple = PyTuple_Check(result) && PyTuple_Size(result) == 2;
const bool is_item0_bool = is_proper_tuple && PyBool_Check(PyTuple_GetItem(result, 0));
const bool is_success = is_proper_tuple && is_item0_bool && PyTuple_GetItem(result, 0) == Py_True;
const bool is_item1_str = is_proper_tuple && IDAPyStr_Check(PyTuple_GetItem(result, 1));
const bool is_item1_str = is_proper_tuple && PyUnicode_Check(PyTuple_GetItem(result, 1));
const bool well_formed = is_proper_tuple && is_item0_bool && ((is_success && is_item1_str) || !is_success);
int swig_res = well_formed;
if ( well_formed )
{
if ( is_item1_str )
IDAPyStr_AsUTF8(param, PyTuple_GetItem(result, 1));
PyUnicode_as_qstring(param, PyTuple_GetItem(result, 1));
else
param->qclear();
}
+2 -2
View File
@@ -16,8 +16,8 @@
("director_method_call_arity_cap", (
True, # add GIL lock
"func",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 3 ? NULL : (PyObject *)obj2), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? NULL : (PyObject *)obj2), NULL)",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 3 ? nullptr : (PyObject *)obj2), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? nullptr : (PyObject *)obj2), nullptr)",
)),
("spontaneous_callback_call", (
False, # add GIL lock
+1 -1
View File
@@ -1,6 +1,6 @@
{
"repl_line" : [
("class casm_t(ida_pro.uintvec_t):", "class casm_t(ida_pro.eavec_t):"),
("class casm_t(ida_pro.ulonglongvec_t):", "class casm_t(ida_pro.eavec_t):"),
("class casm_t(ida_pro.uint64vec_t):", "class casm_t(ida_pro.eavec_t):"),
],
}
+22 -13
View File
@@ -13,8 +13,8 @@
("director_method_call_arity_cap", (
False, # add GIL lock
"ev_get_bg_color",
"(method , __argcnt == 2 ? (PyObject *) obj1 : (PyObject *) obj0, __argcnt == 2 ? (PyObject *) NULL : (PyObject *) obj1, NULL)",
"(swig_get_self(), (PyObject *) swig_method_name , __argcnt == 2 ? (PyObject *) obj1 : (PyObject *) obj0, __argcnt == 2 ? (PyObject *) NULL : (PyObject *) obj1, NULL)")
"(method , __argcnt == 2 ? (PyObject *) obj1 : (PyObject *) obj0, __argcnt == 2 ? (PyObject *) nullptr : (PyObject *) obj1, nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name , __argcnt == 2 ? (PyObject *) obj1 : (PyObject *) obj0, __argcnt == 2 ? (PyObject *) nullptr : (PyObject *) obj1, nullptr)")
),
("insert_before_text", ("int swig_val;",
@@ -25,10 +25,10 @@ if ( __argcnt == 2 )
{
result = PyInt_FromLong(0);
}
else if ( IDAPyInt_Check(result) )
else if ( PyLong_Check(result) )
{
*color = bgcolor_t(IDAPyInt_AsLong(result));
result = IDAPyInt_FromLong(1);
*color = bgcolor_t(PyLong_AsLong(result));
result = PyLong_FromLong(1);
}
}
""")),
@@ -52,8 +52,8 @@ if ( __argcnt == 2 )
("director_method_call_arity_cap", (
False, # add GIL lock
"renamed",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? NULL : (PyObject *)obj3), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? NULL : (PyObject *)obj3), NULL)")
"(method ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? nullptr : (PyObject *)obj3), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? nullptr : (PyObject *)obj3), nullptr)")
),
],
@@ -61,8 +61,8 @@ if ( __argcnt == 2 )
("director_method_call_arity_cap", (
False, # add GIL lock
"compiler_changed",
"(method ,(__argcnt == 1 ? NULL : (PyObject *)obj0), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(__argcnt == 1 ? NULL : (PyObject *)obj0), NULL)")
"(method ,(__argcnt == 1 ? nullptr : (PyObject *)obj0), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(__argcnt == 1 ? nullptr : (PyObject *)obj0), nullptr)")
),
],
@@ -70,8 +70,8 @@ if ( __argcnt == 2 )
("director_method_call_arity_cap", (
False, # add GIL lock
"bookmark_changed",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? NULL : (PyObject *)obj3), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? NULL : (PyObject *)obj3), NULL)")
"(method ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? nullptr : (PyObject *)obj3), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2,(__argcnt < 5 ? nullptr : (PyObject *)obj3), nullptr)")
),
],
@@ -79,8 +79,17 @@ if ( __argcnt == 2 )
("director_method_call_arity_cap", (
False, # add GIL lock
"segm_deleted",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? NULL : (PyObject *)obj2), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? NULL : (PyObject *)obj2), NULL)")
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? nullptr : (PyObject *)obj2), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? nullptr : (PyObject *)obj2), nullptr)")
),
],
"SwigDirector_IDB_Hooks::struc_renamed" : [
("director_method_call_arity_cap", (
False, # add GIL lock
"struc_renamed",
"(method ,(PyObject *)obj0,(__argcnt < 3 ? nullptr : (PyObject *)obj1), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(__argcnt < 3 ? nullptr : (PyObject *)obj1), nullptr)")
),
],
}
+14 -6
View File
@@ -17,24 +17,24 @@
("director_method_call_arity_cap", (
False, # add GIL lock
"populating_widget_popup",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 3 ? NULL : (PyObject *)obj2), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? NULL : (PyObject *)obj2), NULL)",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 3 ? nullptr : (PyObject *)obj2), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? nullptr : (PyObject *)obj2), nullptr)",
)),
],
"SwigDirector_UI_Hooks::finish_populating_widget_popup" : [
("director_method_call_arity_cap", (
False, # add GIL lock
"finish_populating_widget_popup",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 3 ? NULL : (PyObject *)obj2), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? NULL : (PyObject *)obj2), NULL)",
"(method ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 3 ? nullptr : (PyObject *)obj2), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1,(__argcnt < 4 ? nullptr : (PyObject *)obj2), nullptr)",
)),
],
"SwigDirector_UI_Hooks::saved" : [
("director_method_call_arity_cap", (
True, # add GIL lock
"saved",
"(method ,(__argcnt < 2 ? NULL : (PyObject *)obj0), NULL)",
"(swig_get_self(), (PyObject *) swig_method_name ,(__argcnt < 2 ? NULL : (PyObject *)obj0), NULL)",
"(method ,(__argcnt < 2 ? nullptr : (PyObject *)obj0), nullptr)",
"(swig_get_self(), (PyObject *) swig_method_name ,(__argcnt < 2 ? nullptr : (PyObject *)obj0), nullptr)",
)),
("spontaneous_callback_call", (
False, # add GIL lock
@@ -42,6 +42,14 @@
None # catch anchor
)),
],
# "SwigDirector_UI_Hooks::database_closed" : [
# ("director_method_call_arity_cap", (
# True, # add GIL lock
# "database_closed",
# "(method ,(__argcnt < 2 ? nullptr : (PyObject *)obj0), nullptr)",
# "(swig_get_self(), (PyObject *) swig_method_name ,(__argcnt < 2 ? nullptr : (PyObject *)obj0), nullptr)",
# )),
# ],
"__additional_thread_unsafe__" :
[
"py_get_ask_form",
+54
View File
@@ -0,0 +1,54 @@
{
"SwigDirector_merge_node_helper_t::print_entry_name" : [
("spontaneous_callback_call", None)
],
"SwigDirector_merge_node_helper_t::print_entry_details" : [
("spontaneous_callback_call", (
True, # add GIL lock
" swig::SwigVar_PyObject obj0;", # try anchor
"}" # catch anchor
)),
],
"SwigDirector_merge_node_helper_t::get_column_headers" : [
("spontaneous_callback_call", (
True, # add GIL lock
" swig::SwigVar_PyObject obj0;", # try anchor
"}" # catch anchor
)),
],
"SwigDirector_merge_node_helper_t::is_mergeable" : [
("spontaneous_callback_call", None)
],
"SwigDirector_merge_node_helper_t::get_netnode" : [
("spontaneous_callback_call", (
True, # add GIL lock
" netnode c_result;", # try anchor
None # catch anchor
)),
],
"SwigDirector_merge_node_helper_t::map_scalar" : [
("spontaneous_callback_call", (
True, # add GIL lock
" swig::SwigVar_PyObject obj0;", # try anchor
"}" # catch anchor
)),
],
"SwigDirector_merge_node_helper_t::map_string" : [
("spontaneous_callback_call", (
True, # add GIL lock
" swig::SwigVar_PyObject obj0;", # try anchor
"}" # catch anchor
)),
],
# ignored, see merge.i
# "SwigDirector_merge_node_helper_t::map_value" :
"SwigDirector_merge_node_helper_t::refresh" : [
("spontaneous_callback_call", (
True, # add GIL lock
" swig::SwigVar_PyObject obj0;", # try anchor
"}" # catch anchor
)),
],
# ignored, see merge.i
# "SwigDirector_merge_node_helper_t::get_log_name" :
}