summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/analysis/blocks
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysa/analysis/blocks')
-rw-r--r--plugins/pychrysa/analysis/blocks/flow.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/pychrysa/analysis/blocks/flow.c b/plugins/pychrysa/analysis/blocks/flow.c
index 216156c..49f3003 100644
--- a/plugins/pychrysa/analysis/blocks/flow.c
+++ b/plugins/pychrysa/analysis/blocks/flow.c
@@ -40,6 +40,8 @@
/* Fournit les adresses limites d'un bloc d'exécution. */
static PyObject *py_flow_block_get_boundary_addresses(PyObject *, void *);
+/* Fournit le rang du bloc dans le flot d'exécution. */
+static PyObject *py_flow_block_get_rank(PyObject *, void *);
@@ -77,6 +79,33 @@ static PyObject *py_flow_block_get_boundary_addresses(PyObject *self, void *clos
}
+/******************************************************************************
+* *
+* Paramètres : self = classe représentant une instruction. *
+* closure = adresse non utilisée ici. *
+* *
+* Description : Fournit le rang du bloc dans le flot d'exécution. *
+* *
+* Retour : Valeur associée à la propriété consultée. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_flow_block_get_rank(PyObject *self, void *closure)
+{
+ PyObject *result; /* Trouvailles à retourner */
+ GFlowBlock *block; /* Version native */
+
+ block = G_FLOW_BLOCK(pygobject_get(self));
+
+ result = Py_BuildValue("I", g_flow_block_get_rank(block));
+
+ return result;
+
+}
+
+
@@ -110,6 +139,10 @@ bool register_python_flow_block(PyObject *module)
"boundary_addresses", (getter)py_flow_block_get_boundary_addresses, (setter)NULL,
"Provide the boundary addresses of the current flow block.", NULL
},
+ {
+ "rank", (getter)py_flow_block_get_rank, (setter)NULL,
+ "Provide the rank of the current block in the execution flow.", NULL
+ },
{ NULL }
};