summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-05-30 20:31:59 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-05-30 20:31:59 (GMT)
commit36760a757f4c3cdecd04d678a41d3484dcdac566 (patch)
treeb4987539ac2bc5bfd65eec1600b464b11766cd0d /plugins
parent3154db88ce14aa681cc553a8910edba1e69d8c2b (diff)
Resolved a suitable symbol depending on the request tolerance.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pychrysa/format/format.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/pychrysa/format/format.c b/plugins/pychrysa/format/format.c
index 290b189..fb8b249 100644
--- a/plugins/pychrysa/format/format.c
+++ b/plugins/pychrysa/format/format.c
@@ -427,13 +427,14 @@ static PyObject *py_binary_format_resolve_symbol(PyObject *self, PyObject *args)
{
PyObject *result; /* Valeur à retourner */
PyObject *py_vmpa; /* Localisation version Python */
+ int strict; /* Tolérance acceptée */
int ret; /* Bilan de lecture des args. */
GBinFormat *format; /* Format de binaire manipulé */
GBinSymbol *symbol; /* Enventuel symbole trouvé */
phys_t diff; /* Décallage éventuel mesuré */
bool found;
- ret = PyArg_ParseTuple(args, "O", &py_vmpa);
+ ret = PyArg_ParseTuple(args, "Op", &py_vmpa, &strict);
if (!ret) return NULL;
ret = PyObject_IsInstance(py_vmpa, (PyObject *)get_python_vmpa_type());
@@ -441,7 +442,7 @@ static PyObject *py_binary_format_resolve_symbol(PyObject *self, PyObject *args)
format = G_BIN_FORMAT(pygobject_get(self));
- found = g_binary_format_resolve_symbol(format, get_internal_vmpa(py_vmpa), &symbol, &diff);
+ found = g_binary_format_resolve_symbol(format, get_internal_vmpa(py_vmpa), strict, &symbol, &diff);
if (found)
{
@@ -526,7 +527,7 @@ PyTypeObject *get_python_binary_format_type(void)
{
"resolve_symbol", py_binary_format_resolve_symbol,
METH_VARARGS,
- "resolve_symbol($self, addr, /)\n--\n\nSearch a position inside a routine by a given address."
+ "resolve_symbol($self, addr, strict, /)\n--\n\nSearch a position inside a routine by a given address."
},
{ NULL }
};