diff options
Diffstat (limited to 'src/arch/jvm')
| -rw-r--r-- | src/arch/jvm/instruction.c | 10 | ||||
| -rw-r--r-- | src/arch/jvm/instruction.h | 2 | ||||
| -rw-r--r-- | src/arch/jvm/operand.c | 12 | ||||
| -rw-r--r-- | src/arch/jvm/processor.c | 12 | 
4 files changed, 18 insertions, 18 deletions
diff --git a/src/arch/jvm/instruction.c b/src/arch/jvm/instruction.c index 7748624..9ada8f0 100644 --- a/src/arch/jvm/instruction.c +++ b/src/arch/jvm/instruction.c @@ -238,7 +238,7 @@ GArchInstruction *g_jvm_instruction_new(JvmOpcodes type)  /******************************************************************************  *                                                                             *  *  Paramètres  : data = flux de données à analyser.                           * -*                pos  = position courante dans ce flux. [OUT]                 * +*                pos  = position courante dans ce flux.                       *  *                len  = taille totale des données à analyser.                 *  *                wide = étendue de la future instruction. [OUT]               *  *                care = la lecture de l'instr. veut-elle les opcodes ? [OUT]  * @@ -251,16 +251,16 @@ GArchInstruction *g_jvm_instruction_new(JvmOpcodes type)  *                                                                             *  ******************************************************************************/ -JvmOpcodes jvm_guess_next_instruction(const bin_t *data, off_t *pos, off_t len, bool *wide, bool *care) +JvmOpcodes jvm_guess_next_instruction(const bin_t *data, off_t pos, off_t len, bool *wide, bool *care)  {      JvmOpcodes result;                      /* Identifiant à retourner     */      bin_t opcode;                           /* Opcode à trouver            */ -    *wide = (data[*pos] == 0xc4); +    *wide = (data[pos] == 0xc4); -    if (*wide && (*pos + 1) == len) return JOP_COUNT; +    if (*wide && (pos + 1) == len) return JOP_COUNT; -    opcode = data[*pos + (*wide ? 1 : 0)]; +    opcode = data[pos + (*wide ? 1 : 0)];      for (result = 0; result < JOP_COUNT; result++)      { diff --git a/src/arch/jvm/instruction.h b/src/arch/jvm/instruction.h index 36f2230..9387680 100644 --- a/src/arch/jvm/instruction.h +++ b/src/arch/jvm/instruction.h @@ -142,7 +142,7 @@ GArchInstruction *g_jvm_instruction_new(JvmOpcodes);  /* Recherche l'identifiant de la prochaine instruction. */ -JvmOpcodes jvm_guess_next_instruction(const bin_t *, off_t *, off_t, bool *, bool *); +JvmOpcodes jvm_guess_next_instruction(const bin_t *, off_t, off_t, bool *, bool *); diff --git a/src/arch/jvm/operand.c b/src/arch/jvm/operand.c index 7e9b08f..da95101 100644 --- a/src/arch/jvm/operand.c +++ b/src/arch/jvm/operand.c @@ -123,7 +123,7 @@ static void g_jvm_operand_class_init(GJvmOperandClass *klass)  /******************************************************************************  *                                                                             * -*  Paramètres  : proc = instance à initialiser.                               * +*  Paramètres  : operand = instance à initialiser.                            *  *                                                                             *  *  Description : Initialise une instance d'opérande de base pour la JVM.      *  *                                                                             * @@ -133,7 +133,7 @@ static void g_jvm_operand_class_init(GJvmOperandClass *klass)  *                                                                             *  ******************************************************************************/ -static void g_jvm_operand_init(GJvmOperand *proc) +static void g_jvm_operand_init(GJvmOperand *operand)  {  } @@ -197,10 +197,10 @@ static void g_jvm_ref_operand_init(GJvmRefOperand *operand)  /******************************************************************************  *                                                                             * -*  Paramètres  : data  = flux de données à analyser.                          * -*                pos   = position courante dans ce flux. [OUT]                * -*                len   = taille totale des données à analyser.                * -*                type  = type de l'opérande.                                  * +*  Paramètres  : data = flux de données à analyser.                           * +*                pos  = position courante dans ce flux. [OUT]                 * +*                len  = taille totale des données à analyser.                 * +*                type = type de l'opérande.                                   *  *                                                                             *  *  Description : Crée un opérande de référence pour la JVM.                   *  *                                                                             * diff --git a/src/arch/jvm/processor.c b/src/arch/jvm/processor.c index c7bfcf9..8226afc 100644 --- a/src/arch/jvm/processor.c +++ b/src/arch/jvm/processor.c @@ -129,11 +129,11 @@ GArchProcessor *g_jvm_processor_new(void)  /******************************************************************************  *                                                                             * -*  Paramètres  : proc   = architecture visée par la procédure.                * -*                data   = flux de données à analyser.                         * -*                pos    = position courante dans ce flux. [OUT]               * -*                len    = taille totale des données à analyser.               * -*                offset = adresse virtuelle de l'instruction.                 * +*  Paramètres  : proc = architecture visée par la procédure.                  * +*                data = flux de données à analyser.                           * +*                pos  = position courante dans ce flux. [OUT]                 * +*                len  = taille totale des données à analyser.                 * +*                addr = adresse virtuelle de l'instruction.                   *  *                                                                             *  *  Description : Décode une instruction dans un flux de données.              *  *                                                                             * @@ -150,7 +150,7 @@ static GArchInstruction *g_jvm_processor_decode_instruction(const GJvmProcessor      bool care;                              /* Traitement des opcodes      */      JvmOpcodes id;                          /* Identifiant d'instruction   */ -    id = jvm_guess_next_instruction(data, pos, len, &wide, &care); +    id = jvm_guess_next_instruction(data, *pos, len, &wide, &care);      if (id != JOP_COUNT && !care)      {  | 
