diff options
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/dalvik/operand.c | 34 | ||||
| -rw-r--r-- | src/arch/dalvik/operand.h | 4 | ||||
| -rw-r--r-- | src/arch/instruction.c | 2 | ||||
| -rw-r--r-- | src/arch/instruction.h | 2 | 
4 files changed, 40 insertions, 2 deletions
| diff --git a/src/arch/dalvik/operand.c b/src/arch/dalvik/operand.c index cc36cb5..7b58b1d 100644 --- a/src/arch/dalvik/operand.c +++ b/src/arch/dalvik/operand.c @@ -788,8 +788,42 @@ static void g_dalvik_pool_operand_to_buffer(const GDalvikPoolOperand *operand, G  } +/****************************************************************************** +*                                                                             * +*  Paramètres  : operand = opérande à consulter.                              * +*                                                                             * +*  Description : Indique la nature de la table de constantes visée ici.       * +*                                                                             * +*  Retour      : Type de table constantes visée.                              * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +DalvikPoolType g_dalvik_pool_operand_get_pool_type(const GDalvikPoolOperand *operand) +{ +    return operand->type; + +} +/****************************************************************************** +*                                                                             * +*  Paramètres  : operand = opérande à consulter.                              * +*                                                                             * +*  Description : Indique l'indice de l'élément dans la table de constantes.   * +*                                                                             * +*  Retour      : Indice de l'élément visé dans la table de constantes.        * +*                                                                             * +*  Remarques   : -                                                            * +*                                                                             * +******************************************************************************/ + +uint32_t g_dalvik_pool_operand_get_index(const GDalvikPoolOperand *operand) +{ +    return operand->index; + +} diff --git a/src/arch/dalvik/operand.h b/src/arch/dalvik/operand.h index da14aa3..4045c5f 100644 --- a/src/arch/dalvik/operand.h +++ b/src/arch/dalvik/operand.h @@ -138,7 +138,11 @@ GType g_dalvik_pool_operand_get_type(void);  /* Crée un opérande visant un élément constant Dalvik. */  GArchOperand *g_dalvik_pool_operand_new(DalvikPoolType, const bin_t *, off_t *, off_t, MemoryDataSize, SourceEndian); +/* Indique la nature de la table de constantes visée ici. */ +DalvikPoolType g_dalvik_pool_operand_get_pool_type(const GDalvikPoolOperand *); +/* Indique l'indice de l'élément dans la table de constantes. */ +uint32_t g_dalvik_pool_operand_get_index(const GDalvikPoolOperand *); diff --git a/src/arch/instruction.c b/src/arch/instruction.c index 14b0038..3bbd15c 100644 --- a/src/arch/instruction.c +++ b/src/arch/instruction.c @@ -322,7 +322,7 @@ const GArchOperand *g_arch_instruction_get_operand(GArchInstruction *instr, size  *                new   = nouvelle opérande à attacher.                        *  *                old   = ancienne opérande à détacher.                        *  *                                                                             * -*  Description : Replace un opérande d'une instruction par un autre.          * +*  Description : Remplace un opérande d'une instruction par un autre.         *  *                                                                             *  *  Retour      : -                                                            *  *                                                                             * diff --git a/src/arch/instruction.h b/src/arch/instruction.h index 0c51b93..2314a56 100644 --- a/src/arch/instruction.h +++ b/src/arch/instruction.h @@ -79,7 +79,7 @@ size_t g_arch_instruction_count_operands(const GArchInstruction *);  /* Fournit un opérande donné d'une instruction. */  const GArchOperand *g_arch_instruction_get_operand(GArchInstruction *, size_t); -/* Replace un opérande d'une instruction par un autre. */ +/* Remplace un opérande d'une instruction par un autre. */  void g_arch_instruction_replace_operand(GArchInstruction *, GArchOperand *, const GArchOperand *);  /* Détache un opérande liée d'une instruction. */ | 
