diff options
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r-- | src/analysis/routine.c | 64 |
1 files changed, 12 insertions, 52 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c index eebcb69..a91e53a 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -38,8 +38,7 @@ struct _GBinRoutine { GObject parent; /* A laisser en premier */ - vmpa2t addr; /* Position physique/mémoire */ - off_t size; /* Taille du code associé */ + mrange_t range; /* Couverture mémoire */ RoutineType type; /* Type de routine */ @@ -214,7 +213,7 @@ void g_binary_routine_finalize(GBinRoutine *routine) int g_binary_routine_compare(const GBinRoutine **a, const GBinRoutine **b) { - return cmp_vmpa(&(*a)->addr, &(*b)->addr); + return cmp_mrange(&(*a)->range, &(*b)->range); } @@ -234,7 +233,7 @@ int g_binary_routine_compare(const GBinRoutine **a, const GBinRoutine **b) int g_binary_routine_rcompare(const GBinRoutine **a, const GBinRoutine **b) { - return (-1) * cmp_vmpa(&(*a)->addr, &(*b)->addr); + return (-1) * cmp_mrange(&(*a)->range, &(*b)->range); } @@ -242,9 +241,9 @@ int g_binary_routine_rcompare(const GBinRoutine **a, const GBinRoutine **b) /****************************************************************************** * * * Paramètres : routine = routine à mettre à jour. * -* addr = position mémoire ou physique déclarée. * +* range = plage mémoire ou physique déclarée. * * * -* Description : Définit la position physique / en mémoire d'une routine. * +* Description : Définit la couverture physique / en mémoire d'une routine. * * * * Retour : - * * * @@ -252,67 +251,28 @@ int g_binary_routine_rcompare(const GBinRoutine **a, const GBinRoutine **b) * * ******************************************************************************/ -void g_binary_routine_set_address(GBinRoutine *routine, const vmpa2t *addr) +void g_binary_routine_set_range(GBinRoutine *routine, const mrange_t *range) { - copy_vmpa(&routine->addr, addr); + copy_mrange(&routine->range, range); } /****************************************************************************** * * -* Paramètres : routine = routine à mettre à jour. * -* * -* Description : Fournit la position physique / en mémoire d'une routine. * -* * -* Retour : Position mémoire ou physique déclarée. * -* * -* Remarques : - * -* * -******************************************************************************/ - -const vmpa2t *g_binary_routine_get_address(const GBinRoutine *routine) -{ - return &routine->addr; - -} - - -/****************************************************************************** -* * -* Paramètres : routine = routine à mettre à jour. * -* size = taille du code associé. * -* * -* Description : Définit la taille du code d'une routine. * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void g_binary_routine_set_size(GBinRoutine *routine, off_t size) -{ - routine->size = size; - -} - - -/****************************************************************************** -* * -* Paramètres : routine = routine à mettre à jour. * +* Paramètres : routine = routine à consulter. * * * -* Description : Fournit la taille du code associé à une routine. * +* Description : Fournit la couverture physique / en mémoire d'une routine. * * * -* Retour : Taille du code associée. * +* Retour : Plage mémoire ou physique déclarée. * * * * Remarques : - * * * ******************************************************************************/ -off_t g_binary_routine_get_size(const GBinRoutine *routine) +const mrange_t *g_binary_routine_get_range(const GBinRoutine *routine) { - return routine->size; + return &routine->range; } |