diff options
Diffstat (limited to 'src/analysis')
| -rw-r--r-- | src/analysis/prototype.c | 40 | ||||
| -rw-r--r-- | src/analysis/prototype.h | 7 | 
2 files changed, 47 insertions, 0 deletions
| diff --git a/src/analysis/prototype.c b/src/analysis/prototype.c index 78854f9..d68a485 100644 --- a/src/analysis/prototype.c +++ b/src/analysis/prototype.c @@ -38,6 +38,7 @@ struct _GBinRoutine      GObject parent;                         /* A laisser en premier        */      vmpa_t addr;                            /* Position physique/mémoire   */ +    off_t size;                             /* Taille du code associé      */      RoutineType type;                       /* Type de routine             */ @@ -202,6 +203,45 @@ vmpa_t g_binary_routine_get_address(const GBinRoutine *routine)  /******************************************************************************  *                                                                             *  *  Paramètres  : routine = routine à mettre à jour.                           * +*                addr    = 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.                           * +*                                                                             * +*  Description : Fournit la taille du code associé à une routine.             * +*                                                                             * +*  Retour      : Taille du code associée.                                     * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +off_t g_binary_routine_get_size(const GBinRoutine *routine) +{ +    return routine->size; + +} + + +/****************************************************************************** +*                                                                             * +*  Paramètres  : routine = routine à mettre à jour.                           *  *                type    = type de routine spécifié.                          *  *                                                                             *  *  Description : Définit le type d'une routine.                               * diff --git a/src/analysis/prototype.h b/src/analysis/prototype.h index 299cce6..fe6d0a4 100644 --- a/src/analysis/prototype.h +++ b/src/analysis/prototype.h @@ -27,6 +27,7 @@  #include <glib-object.h>  #include <stdint.h> +#include <sys/types.h>  #include "variable.h" @@ -69,6 +70,12 @@ void g_binary_routine_set_address(GBinRoutine *, vmpa_t);  /* Fournit la position physique / en mémoire d'une routine. */  vmpa_t g_binary_routine_get_address(const GBinRoutine *); +/* Définit la taille du code d'une routine. */ +void g_binary_routine_set_size(GBinRoutine *, off_t); + +/* Fournit la taille du code associé à une routine. */ +off_t g_binary_routine_get_size(const GBinRoutine *); +  /* Définit le type d'une routine. */  void g_binary_routine_set_type(GBinRoutine *, RoutineType); | 
