diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/arm/v7/processor.c | 1 | ||||
-rw-r--r-- | plugins/dalvik/processor.c | 1 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/processor.c | 52 |
3 files changed, 53 insertions, 1 deletions
diff --git a/plugins/arm/v7/processor.c b/plugins/arm/v7/processor.c index e708814..b7a73f4 100644 --- a/plugins/arm/v7/processor.c +++ b/plugins/arm/v7/processor.c @@ -129,6 +129,7 @@ static void g_armv7_processor_init(GArmV7Processor *proc) parent->endianness = SRE_LITTLE; parent->memsize = MDS_32_BITS; parent->inssize = MDS_32_BITS; + parent->virt_space = true; } diff --git a/plugins/dalvik/processor.c b/plugins/dalvik/processor.c index 93e66fa..8d24d5a 100644 --- a/plugins/dalvik/processor.c +++ b/plugins/dalvik/processor.c @@ -113,6 +113,7 @@ static void g_dalvik_processor_init(GDalvikProcessor *proc) parent->endianness = SRE_LITTLE; parent->memsize = MDS_32_BITS; parent->inssize = MDS_16_BITS; + parent->virt_space = false; } 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 }, |