diff options
Diffstat (limited to 'plugins/readdex/class.c')
-rw-r--r-- | plugins/readdex/class.c | 55 |
1 files changed, 17 insertions, 38 deletions
diff --git a/plugins/readdex/class.c b/plugins/readdex/class.c index 9d9d0af..43455b2 100644 --- a/plugins/readdex/class.c +++ b/plugins/readdex/class.c @@ -73,7 +73,6 @@ bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status) vmpa2t pos; /* Tête de lecture des symboles*/ activity_id_t msg; /* Message de progression */ uint32_t i; /* Boucle de parcours */ - vmpa2t start; /* Localisation des symboles */ GArchInstruction *instr; /* Instruction décodée */ GArchOperand *operand; /* Opérande à venir modifier */ GDbComment *comment; /* Définition de commentaire */ @@ -99,14 +98,13 @@ bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status) { /* class_idx */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index into the type_ids list for this class")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -115,92 +113,85 @@ bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status) /* access_flags */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Access flags for the class")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* superclass_idx */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index for the superclass or NO_INDEX if this class has no superclass")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* interfaces_off */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Offset to the list of interfaces")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* source_file_idx */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index for the name of the file containing the original source or NO_INDEX")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* annotations_off */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Offset to the annotations structure for this class")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* class_data_off */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Offset to the associated class data for this item")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* static_values_off */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_32_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Offset to the list of initial values for static fields")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -247,7 +238,6 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c bool result; /* Bilan à retourner */ GBinContent *content; /* Contenu binaire à lire */ vmpa2t pos; /* Tête de lecture des symboles*/ - vmpa2t start; /* Localisation des symboles */ GArchInstruction *instr; /* Instruction décodée */ GArchOperand *operand; /* Opérande à venir modifier */ GDbComment *comment; /* Définition de commentaire */ @@ -263,14 +253,13 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c /* static_fields_size */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_uleb128(content, &pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Number of static fields defined in this item")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -278,40 +267,37 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c /* instance_fields_size */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_uleb128(content, &pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Number of instance fields defined in this item")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* direct_methods_size */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_uleb128(content, &pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Number of direct methods defined in this item")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* virtual_methods_size */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_uleb128(content, &pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Number of virtual methods defined in this item")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -362,7 +348,6 @@ static bool annotate_dex_class_data(const GDexFormat *format, const GDexClass *c static bool annotate_dex_encoded_field(const GDexFormat *format, vmpa2t *pos) { GBinContent *content; /* Contenu binaire à lire */ - vmpa2t start; /* Localisation des symboles */ GArchInstruction *instr; /* Instruction décodée */ GArchOperand *operand; /* Opérande à venir modifier */ GDbComment *comment; /* Définition de commentaire */ @@ -373,14 +358,13 @@ static bool annotate_dex_encoded_field(const GDexFormat *format, vmpa2t *pos) /* field_idx_diff */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index into the field_ids list for the identity of this field")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -388,14 +372,13 @@ static bool annotate_dex_encoded_field(const GDexFormat *format, vmpa2t *pos) /* access_flags */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Access flags for the field")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -426,7 +409,6 @@ static bool annotate_dex_encoded_method(const GDexFormat *format, const encoded_ { bool result; /* Bilan à retourner */ GBinContent *content; /* Contenu binaire à lire */ - vmpa2t start; /* Localisation des symboles */ GArchInstruction *instr; /* Instruction décodée */ GArchOperand *operand; /* Opérande à venir modifier */ GDbComment *comment; /* Définition de commentaire */ @@ -437,14 +419,13 @@ static bool annotate_dex_encoded_method(const GDexFormat *format, const encoded_ /* method_idx_diff */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index into the method_ids list for the identity of this method")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -452,27 +433,25 @@ static bool annotate_dex_encoded_method(const GDexFormat *format, const encoded_ /* access_flags */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Access flags for the method")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* code_off */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Offset to the code structure for this method")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); |