summaryrefslogtreecommitdiff
path: root/src/analysis/blocks/flow.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-01-13 20:23:05 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-01-13 20:23:05 (GMT)
commit35a6cd881528b5f77ce09476eccb39d02d9cc634 (patch)
tree13e0f080a277eb0647b6917f18fbe2cb84a67369 /src/analysis/blocks/flow.h
parent221bcaeeb06415d501f9abbb9bc4b7d8339af1fe (diff)
Defined the registers allocation needs for each basic block.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@323 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/blocks/flow.h')
-rw-r--r--src/analysis/blocks/flow.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/analysis/blocks/flow.h b/src/analysis/blocks/flow.h
index 28fb5a9..a01ef64 100644
--- a/src/analysis/blocks/flow.h
+++ b/src/analysis/blocks/flow.h
@@ -29,6 +29,7 @@
#include <glib-object.h>
+#include "raccess.h"
#include "../block.h"
#include "../../arch/instruction.h"
@@ -49,6 +50,20 @@ typedef struct _GFlowBlock GFlowBlock;
typedef struct _GFlowBlockClass GFlowBlockClass;
+/* Position au cours d'une visite */
+typedef enum _BlockFollowPosition
+{
+ BFP_ENTER = (1 << 0), /* Entrée dans le bloc */
+ BFP_FOLLOW = (1 << 1), /* Suivi des liens : aller... */
+ BFP_BACK = (1 << 2), /* Suivi des liens : retour ! */
+ BFP_EXIT = (1 << 3) /* Sortie du bloc */
+
+} BlockFollowPosition;
+
+/* Rappel à chaque bloc visité */
+typedef bool (* flow_block_follow_cb) (GFlowBlock *, BlockFollowPosition, void *);
+
+
/* Indique le type défini pour un bloc d'exécution d'instructions. */
GType g_flow_block_get_type(void);
@@ -64,6 +79,15 @@ void g_flow_block_get_boundary(const GFlowBlock *, GArchInstruction **, GArchIns
/* Fournit les adresses limites d'un bloc d'exécution. */
void g_flow_block_get_boundary_addresses(const GFlowBlock *, vmpa_t *, vmpa_t *);
+/* Suit le flot d'excution bloc par bloc. */
+bool g_flow_block_follow(GFlowBlock *, const GInstrBlock *, BlockFollowPosition, flow_block_follow_cb, void *);
+
+/* Fournit les différents accès aux registres. */
+const GRAccessList *g_flow_block_list_regs_accesses(const GFlowBlock *);
+
+/* Fournit les registres écrits par le bloc et utilisées après. */
+GRAccessList *g_flow_block_list_awaited_regs(const GFlowBlock *);
+
#endif /* _ANALYSIS_BLOCKS_FLOW_H */