diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-01-01 23:29:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-01-01 23:29:57 (GMT) |
commit | bfd81d1f289913f4d6e09cd8d99f4aaeed98436b (patch) | |
tree | efc747ec80f83fc248da1e8e4ac06c4e7d3347dd /src/analysis/routine.c | |
parent | bb6d0c758f8c720d8074bf74e6bd001e36d6a918 (diff) |
Fixed the computing of basic blocks and used them in graphic views.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@316 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r-- | src/analysis/routine.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c index d52b74a..048d11a 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -57,6 +57,7 @@ struct _GBinRoutine size_t locals_count; /* Nombre de variables locales */ GArchInstruction *instr; /* Instructions natives */ + GInstrBlock *blocks; /* Blocs basiques d'instruct° */ GDecInstruction *dinstr; /* Instructions décompilées */ }; @@ -800,6 +801,48 @@ void g_binary_routine_set_instructions(GBinRoutine *routine, GArchInstruction *i * * * Paramètres : routine = routine à consulter. * * * +* Description : Fournit les blocs basiques de la routine. * +* * +* Retour : Ensemble de blocs déterminés via les instructions. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GInstrBlock *g_binary_routine_get_basic_blocks(const GBinRoutine *routine) +{ + return routine->blocks; + +} + + +/****************************************************************************** +* * +* Paramètres : routine = routine à mettre à jour. * +* blocks = ensemble de blocs déterminés via les instructions. * +* * +* Description : Définit les blocs basiques de la routine. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_binary_routine_set_basic_blocks(GBinRoutine *routine, GInstrBlock *blocks) +{ + if (routine->blocks != NULL) + g_object_unref(G_OBJECT(routine->blocks)); + + routine->blocks = blocks; + +} + + +/****************************************************************************** +* * +* Paramètres : routine = routine à consulter. * +* * * Description : Fournit les instructions décompilées correspondantes. * * * * Retour : Ensemble d'instructions décompilées ou NULL. * |