summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-06-06 16:34:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-06-06 16:34:00 (GMT)
commit8827cf755762f70f0c4edb3bafe5d79b9fee0f15 (patch)
tree1417fac02b61c037f98f23a9c107f3bb4accaea7 /plugins/pychrysalide/arch
parent4b36edf684b49eb5584f8f0c5aff3dd7aac2c834 (diff)
Hidden virtual addresses when code runs in a VM.
Diffstat (limited to 'plugins/pychrysalide/arch')
-rw-r--r--plugins/pychrysalide/arch/processor.c52
1 files changed, 51 insertions, 1 deletions
diff --git a/plugins/pychrysalide/arch/processor.c b/plugins/pychrysalide/arch/processor.c
index 65431af..c2ee530 100644
--- a/plugins/pychrysalide/arch/processor.c
+++ b/plugins/pychrysalide/arch/processor.c
@@ -50,7 +50,8 @@
-
+/* Indique si l'architecture possède un espace virtuel ou non. */
+static PyObject *py_arch_processor_has_virtual_space(PyObject *, void *);
@@ -87,6 +88,51 @@ static bool define_python_arch_processor_constants(PyTypeObject *);
+
+
+
+
+
+
+
+
+
+
+/******************************************************************************
+* *
+* Paramètres : self = objet Python concerné par l'appel. *
+* closure = non utilisé ici. *
+* *
+* Description : Indique si l'architecture possède un espace virtuel ou non. *
+* *
+* Retour : True si un espace virtuel existe, False sinon. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_arch_processor_has_virtual_space(PyObject *self, void *closure)
+{
+ PyObject *result; /* Instance Python à retourner */
+ GArchProcessor *proc; /* Architecture visée */
+ bool status; /* Bilan de consultation */
+
+ proc = G_ARCH_PROCESSOR(pygobject_get(self));
+
+ status = g_arch_processor_has_virtual_space(proc);
+
+ result = status ? Py_True : Py_False;
+ Py_INCREF(result);
+
+ return result;
+
+}
+
+
+
+
+
+
/* ---------------------------------------------------------------------------------- */
/* CONSERVATION DES SOUCIS DURANT LE CHARGEMENT */
/* ---------------------------------------------------------------------------------- */
@@ -396,6 +442,10 @@ PyTypeObject *get_python_arch_processor_type(void)
static PyGetSetDef py_arch_processor_getseters[] = {
{
+ "virtual_space", py_arch_processor_has_virtual_space, NULL,
+ "Tell if the processor provides a virtual address space.", NULL
+ },
+ {
"errors", py_arch_processor_get_errors, NULL,
"List of all detected errors which occurred during the disassembling process.", NULL
},