diff options
Diffstat (limited to 'src/arch/dalvik/decomp')
| -rw-r--r-- | src/arch/dalvik/decomp/const.c | 4 | ||||
| -rw-r--r-- | src/arch/dalvik/decomp/iget.c | 4 | ||||
| -rw-r--r-- | src/arch/dalvik/decomp/invoke.c | 12 | ||||
| -rw-r--r-- | src/arch/dalvik/decomp/iput.c | 4 | ||||
| -rw-r--r-- | src/arch/dalvik/decomp/new.c | 4 | 
5 files changed, 7 insertions, 21 deletions
| diff --git a/src/arch/dalvik/decomp/const.c b/src/arch/dalvik/decomp/const.c index 47a859e..98133ac 100644 --- a/src/arch/dalvik/decomp/const.c +++ b/src/arch/dalvik/decomp/const.c @@ -83,7 +83,6 @@ GDecInstruction *dalvik_decomp_instr_const_str(const GArchInstruction *instr, GD      GArchOperand *operand;                  /* Opérande de l'instruction   */      GDecInstruction *reg;                   /* Pseudo-registre redéfini    */      uint32_t index;                         /* Indice de la chaîne         */ -    GDexFormat *format;                     /* Accès aux constantes        */      const char *value;                      /* Chaîne de caractères        */      GDecInstruction *str;                   /* Chaîne décompilée           */ @@ -93,8 +92,7 @@ GDecInstruction *dalvik_decomp_instr_const_str(const GArchInstruction *instr, GD      operand = g_arch_instruction_get_operand(instr, 1);      index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand)); -    format = G_DEX_FORMAT(g_object_get_data(G_OBJECT(ctx), "format")); -    value = get_string_from_dex_pool(format, index); +    value = get_string_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);      if (value == NULL) return NULL;      str = g_str_expression_new(value); diff --git a/src/arch/dalvik/decomp/iget.c b/src/arch/dalvik/decomp/iget.c index 931438c..5d1cf65 100644 --- a/src/arch/dalvik/decomp/iget.c +++ b/src/arch/dalvik/decomp/iget.c @@ -50,7 +50,6 @@ GDecInstruction *dalvik_decomp_instr_iget(const GArchInstruction *instr, GDecCon      GArchOperand *operand;                  /* Opérande de l'instruction   */      GDecInstruction *src;                   /* Registre de l'object        */      uint32_t index;                         /* Indice dans la table        */ -    GDexFormat *format;                     /* Accès aux constantes        */      GDecInstruction *field;                 /* Champ concerné par l'opérat°*/      GBinVariable *var;                      /* Variable / champ accédé     */      GDecInstruction *dest;                  /* Registre de destination     */ @@ -61,8 +60,7 @@ GDecInstruction *dalvik_decomp_instr_iget(const GArchInstruction *instr, GDecCon      operand = g_arch_instruction_get_operand(instr, 2);      index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand)); -    format = G_DEX_FORMAT(g_object_get_data(G_OBJECT(ctx), "format")); -    var = get_field_from_dex_pool(format, index); +    var = get_field_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);      field = g_pseudo_register_new();      g_pseudo_register_set_variable(G_PSEUDO_REGISTER(field), var); diff --git a/src/arch/dalvik/decomp/invoke.c b/src/arch/dalvik/decomp/invoke.c index 6f863be..7337ccc 100644 --- a/src/arch/dalvik/decomp/invoke.c +++ b/src/arch/dalvik/decomp/invoke.c @@ -58,7 +58,6 @@ GDecInstruction *dalvik_decomp_instr_invoke_direct(const GArchInstruction *instr      size_t count;                           /* Quantité d'opérandes        */      GArchOperand *operand;                  /* Opérande de l'instruction   */      uint32_t index;                         /* Indice de l'élément visé    */ -    GDexFormat *format;                     /* Accès aux constantes        */      GBinRoutine *routine;                   /* Routine visée par l'appel   */      const char *name;                       /* Chaîne à afficher           */      GDecInstruction *src;                   /* Source de l'assignation     */ @@ -80,8 +79,7 @@ GDecInstruction *dalvik_decomp_instr_invoke_direct(const GArchInstruction *instr      index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand)); -    format = G_DEX_FORMAT(g_object_get_data(G_OBJECT(ctx), "format")); -    routine = get_routine_from_dex_pool(format, index); +    routine = get_routine_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);      if (routine == NULL) return NULL;      /* Détermination de la routine-cible exacte */ @@ -158,7 +156,6 @@ GDecInstruction *dalvik_decomp_instr_invoke_static(const GArchInstruction *instr      size_t count;                           /* Quantité d'opérandes        */      GArchOperand *operand;                  /* Opérande de l'instruction   */      uint32_t index;                         /* Indice de l'élément visé    */ -    GDexFormat *format;                     /* Accès aux constantes        */      GBinRoutine *routine;                   /* Routine visée par l'appel   */      GDecInstruction *call;                  /* Représentation de l'appel   */      size_t i;                               /* Boucle de parcours #2       */ @@ -174,8 +171,7 @@ GDecInstruction *dalvik_decomp_instr_invoke_static(const GArchInstruction *instr      index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand)); -    format = G_DEX_FORMAT(g_object_get_data(G_OBJECT(ctx), "format")); -    routine = get_routine_from_dex_pool(format, index); +    routine = get_routine_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);      if (routine == NULL) return NULL;      call = g_routine_call_new(routine); @@ -218,7 +214,6 @@ GDecInstruction *dalvik_decomp_instr_invoke_virtual(const GArchInstruction *inst      size_t count;                           /* Quantité d'opérandes        */      GArchOperand *operand;                  /* Opérande de l'instruction   */      uint32_t index;                         /* Indice de l'élément visé    */ -    GDexFormat *format;                     /* Accès aux constantes        */      GBinRoutine *routine;                   /* Routine visée par l'appel   */      GDecInstruction *call;                  /* Représentation de l'appel   */      size_t i;                               /* Boucle de parcours #2       */ @@ -234,8 +229,7 @@ GDecInstruction *dalvik_decomp_instr_invoke_virtual(const GArchInstruction *inst      index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand)); -    format = G_DEX_FORMAT(g_object_get_data(G_OBJECT(ctx), "format")); -    routine = get_routine_from_dex_pool(format, index); +    routine = get_routine_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);      if (routine == NULL) return NULL;      call = g_routine_call_new(routine); diff --git a/src/arch/dalvik/decomp/iput.c b/src/arch/dalvik/decomp/iput.c index 002bdd4..fedb00e 100644 --- a/src/arch/dalvik/decomp/iput.c +++ b/src/arch/dalvik/decomp/iput.c @@ -51,7 +51,6 @@ GDecInstruction *dalvik_decomp_instr_iput(const GArchInstruction *instr, GDecCon      GDecInstruction *dest;                  /* Registre de destination     */      GDecInstruction *src;                   /* Registre de l'object        */      uint32_t index;                         /* Indice dans la table        */ -    GDexFormat *format;                     /* Accès aux constantes        */      GDecInstruction *field;                 /* Champ concerné par l'opérat°*/      GBinVariable *var;                      /* Variable / champ accédé     */      GDecInstruction *access;                /* Représentation de l'accès   */ @@ -64,8 +63,7 @@ GDecInstruction *dalvik_decomp_instr_iput(const GArchInstruction *instr, GDecCon      operand = g_arch_instruction_get_operand(instr, 2);      index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand)); -    format = G_DEX_FORMAT(g_object_get_data(G_OBJECT(ctx), "format")); -    var = get_field_from_dex_pool(format, index); +    var = get_field_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);      field = g_pseudo_register_new();      g_pseudo_register_set_variable(G_PSEUDO_REGISTER(field), var); diff --git a/src/arch/dalvik/decomp/new.c b/src/arch/dalvik/decomp/new.c index ff80411..75dc259 100644 --- a/src/arch/dalvik/decomp/new.c +++ b/src/arch/dalvik/decomp/new.c @@ -48,7 +48,6 @@ GDecInstruction *dalvik_decomp_instr_new_instance(const GArchInstruction *instr,      GDecInstruction *result;                /* Instruction à retourner     */      GArchOperand *operand;                  /* Opérande de l'instruction   */      uint32_t index;                         /* Indice dans la table        */ -    GDexFormat *format;                     /* Accès aux constantes        */      GDataType *type;                        /* Type concerné par l'opérat° */      GBinRoutine *constructor;               /* Constructeur reconstruit    */      GDecInstruction *call;                  /* Appel au constructeur       */ @@ -56,8 +55,7 @@ GDecInstruction *dalvik_decomp_instr_new_instance(const GArchInstruction *instr,      operand = g_arch_instruction_get_operand(instr, 1);      index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand)); -    format = G_DEX_FORMAT(g_object_get_data(G_OBJECT(ctx), "format")); -    type = get_type_from_dex_pool(format, index); +    type = get_type_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);      constructor = g_binary_routine_new_constructor(type);      call = g_routine_call_new(constructor); | 
