diff options
Diffstat (limited to 'plugins/readdex/ids.c')
-rw-r--r-- | plugins/readdex/ids.c | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/plugins/readdex/ids.c b/plugins/readdex/ids.c index c6bef48..1b4e623 100644 --- a/plugins/readdex/ids.c +++ b/plugins/readdex/ids.c @@ -57,7 +57,6 @@ bool annotate_dex_string_ids(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 */ @@ -65,6 +64,7 @@ bool annotate_dex_string_ids(const GDexFormat *format, GtkStatusStack *status) char *text; /* Texte constant à insérer */ phys_t loc; /* Localisation physique */ vmpa2t item_pos; /* Position d'un élément */ + vmpa2t start; /* Sauvagarde d'une position */ uleb128_t length; /* Taille de la chaîne en cours*/ MemoryDataSize leb_size; /* Taille de la taille */ @@ -83,14 +83,13 @@ bool annotate_dex_string_ids(const GDexFormat *format, GtkStatusStack *status) { /* Saut vers la définition */ - 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 for string item #%u/%u"), i, header->string_ids_size - 1); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -119,13 +118,12 @@ bool annotate_dex_string_ids(const GDexFormat *format, GtkStatusStack *status) SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, _("String length")); + ADD_RAW_AS_SYM(format, symbol, instr, comment, _("String length")); /* Description de la chaîne : contenu */ if (length > 0) { - copy_vmpa(&start, &item_pos); instr = g_raw_instruction_new_array(content, MDS_8_BITS, length, &item_pos, endian); g_raw_instruction_mark_as_string(G_RAW_INSTRUCTION(instr), true); @@ -168,7 +166,6 @@ bool annotate_dex_type_ids(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 */ @@ -188,14 +185,13 @@ bool annotate_dex_type_ids(const GDexFormat *format, GtkStatusStack *status) for (i = 0; i < header->type_ids_size; i++) { - 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 descriptor string of this type")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -236,7 +232,6 @@ bool annotate_dex_proto_ids(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 */ @@ -258,14 +253,13 @@ bool annotate_dex_proto_ids(const GDexFormat *format, GtkStatusStack *status) { /* shorty_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 short-form descriptor string of this prototype")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -274,27 +268,25 @@ bool annotate_dex_proto_ids(const GDexFormat *format, GtkStatusStack *status) /* return_type_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 return type of this prototype")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* parameters_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_DEC); asprintf(&text, _("Offset to the list of parameter types for this prototype")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -332,7 +324,6 @@ bool annotate_dex_field_ids(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 */ @@ -354,14 +345,13 @@ bool annotate_dex_field_ids(const GDexFormat *format, GtkStatusStack *status) { /* class_idx */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_16_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index for the definer of this field")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -370,27 +360,25 @@ bool annotate_dex_field_ids(const GDexFormat *format, GtkStatusStack *status) /* type_idx */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_16_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index for the type of this field")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* name_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 this field")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -428,7 +416,6 @@ bool annotate_dex_method_ids(const GDexFormat *format, GtkStatusStack *status) vmpa2t pos; /* Tête de lecture des symboles*/ uint32_t i; /* Boucle de parcours */ activity_id_t msg; /* Message de progression */ - vmpa2t start; /* Localisation des symboles */ GArchInstruction *instr; /* Instruction décodée */ GArchOperand *operand; /* Opérande à venir modifier */ GDbComment *comment; /* Définition de commentaire */ @@ -450,14 +437,13 @@ bool annotate_dex_method_ids(const GDexFormat *format, GtkStatusStack *status) { /* class_idx */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_16_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index for the definer of this field")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -466,27 +452,25 @@ bool annotate_dex_method_ids(const GDexFormat *format, GtkStatusStack *status) /* proto_idx */ - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_16_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index for the prototype of this method")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* name_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 this method")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); |