summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/arch/instruction.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-09-15 08:19:09 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-09-15 08:19:09 (GMT)
commit944fc0a5638bfe77fc65e514fbdd945d8a652635 (patch)
treecaad1d6c5f001dd02380aa2fae0c6dc8d67d9b60 /plugins/pychrysa/arch/instruction.c
parent09d07908465d462101d27ecb1b60df52d63bbe5d (diff)
Shown all Android permissions with links to the code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@262 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/pychrysa/arch/instruction.c')
-rw-r--r--plugins/pychrysa/arch/instruction.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/pychrysa/arch/instruction.c b/plugins/pychrysa/arch/instruction.c
index 80cc4ee..bed937b 100644
--- a/plugins/pychrysa/arch/instruction.c
+++ b/plugins/pychrysa/arch/instruction.c
@@ -72,6 +72,9 @@ static PyObject *py_arch_instruction_get_iter(PyObject *);
/* Fournit la valeur associée à une propriété donnée. */
static PyObject *py_arch_instruction_get_location(PyObject *, char *);
+/* Fournit le nom humain de l'instruction manipulée. */
+static PyObject *py_arch_instruction_get_keyword(PyObject *, void *);
+
/* ---------------------------------------------------------------------------------- */
@@ -347,6 +350,35 @@ static PyObject *py_arch_instruction_get_location(PyObject *self, char *name)
/******************************************************************************
* *
+* Paramètres : self = classe représentant une instruction. *
+* unused = adresse non utilisée ici. *
+* *
+* Description : Fournit le nom humain de l'instruction manipulée. *
+* *
+* Retour : Valeur associée à la propriété consultée. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_arch_instruction_get_keyword(PyObject *self, void *unused)
+{
+ PyObject *result; /* Trouvailles à retourner */
+ GArchInstruction *instr; /* Version native */
+ const char *kw; /* Valeur récupérée */
+
+ instr = G_ARCH_INSTRUCTION(pygobject_get(self));
+ kw = g_arch_instruction_get_keyword(instr);
+
+ result = PyString_FromString(kw);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : module = module dont la définition est à compléter. *
* *
* Description : Prend en charge l'objet 'pychrysalide.arch.ArchInstruction'. *
@@ -379,6 +411,10 @@ bool register_python_arch_instruction(PyObject *module)
"address", (getter)py_arch_instruction_get_location, (setter)NULL,
"Provide the location of the instruction in memory.", "address"
},
+ {
+ "keyword", (getter)py_arch_instruction_get_keyword, (setter)NULL,
+ "Give le name of the assembly instruction.", NULL
+ },
{ NULL }
};