diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-05-14 19:19:11 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-05-14 19:19:11 (GMT) |
commit | cb36603eb37330ab6c956095c1ce175acb751e03 (patch) | |
tree | e20d2e60c8947fddd34db543e41fa4287fc0db29 /src/analysis/routine.c | |
parent | 198ba09ef74a02a727ac3e679edfa328b2508152 (diff) |
Begun to clean the symbol interface.
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r-- | src/analysis/routine.c | 50 |
1 files changed, 4 insertions, 46 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c index 583e151..c916c66 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -36,13 +36,14 @@ #include "../arch/raw.h" #include "../common/extstr.h" #include "../core/params.h" +#include "../format/symbol-int.h" /* Représentation générique de routine (instance) */ struct _GBinRoutine { - GObject parent; /* A laisser en premier */ + GBinSymbol parent; /* A laisser en premier */ mrange_t range; /* Couverture mémoire */ @@ -64,7 +65,6 @@ struct _GBinRoutine GBinVariable **locals; /* Variables locales du code */ size_t locals_count; /* Nombre de variables locales */ - GArchInstruction *instr; /* Instructions natives */ GBlockList *blocks; /* Blocs basiques d'instruct° */ //GDecInstruction *dinstr; /* Instructions décompilées */ @@ -74,7 +74,7 @@ struct _GBinRoutine /* Représentation générique de routine (classe) */ struct _GBinRoutineClass { - GObjectClass parent; /* A laisser en premier */ + GBinSymbolClass parent; /* A laisser en premier */ }; @@ -91,7 +91,7 @@ static void g_binary_routine_reset_declarator(GBinRoutine *, bool); /* Indique le type définit pour une représentation de routine. */ -G_DEFINE_TYPE(GBinRoutine, g_bin_routine, G_TYPE_OBJECT); +G_DEFINE_TYPE(GBinRoutine, g_bin_routine, G_TYPE_BIN_SYMBOL); /****************************************************************************** @@ -808,48 +808,6 @@ size_t g_binary_routine_get_var_index_from_offset(const GBinRoutine *routine, si * * * Paramètres : routine = routine à consulter. * * * -* Description : Fournit les instructions natives correspondantes. * -* * -* Retour : Ensemble d'instructions décompilées ou NULL. * -* * -* Remarques : - * -* * -******************************************************************************/ - -GArchInstruction *g_binary_routine_get_instructions(const GBinRoutine *routine) -{ - return routine->instr; - -} - - -/****************************************************************************** -* * -* Paramètres : routine = routine à mettre à jour. * -* instr = série d'instructions à conserver. * -* * -* Description : Définit les instructions natives de la routine. * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void g_binary_routine_set_instructions(GBinRoutine *routine, GArchInstruction *instr) -{ - if (routine->instr != NULL) - g_object_unref(G_OBJECT(routine->instr)); - - routine->instr = instr; - -} - - -/****************************************************************************** -* * -* Paramètres : routine = routine à consulter. * -* * * Description : Fournit les blocs basiques de la routine. * * * * Retour : Ensemble de blocs déterminés via les instructions. * |