diff options
Diffstat (limited to 'plugins/readdex/code.c')
-rw-r--r-- | plugins/readdex/code.c | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/plugins/readdex/code.c b/plugins/readdex/code.c index 6c2a36e..62e846f 100644 --- a/plugins/readdex/code.c +++ b/plugins/readdex/code.c @@ -68,7 +68,6 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) GBinContent *content; /* Contenu binaire à lire */ SourceEndian endian; /* Boutisme utilisé */ 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 */ @@ -87,14 +86,13 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) /* registers_size */ - 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, _("Number of registers used by this code")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -102,40 +100,37 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) /* ins_size */ - 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, _("Number of words of incoming arguments to the method that this code is for")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* outs_size */ - 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, _("Number of words of outgoing argument space required by this code for method invocation")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* tries_size */ - 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, _("Number of try_items for this instance")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -143,27 +138,25 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) /* debug_info_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 debug info sequence for this code")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* insns_size */ - 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, _("Size of the instructions list, in 16-bit code units")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -177,14 +170,13 @@ bool annotate_dex_code_item(const GDexFormat *format, uleb128_t offset) if (insns_size % 2 != 0) { - copy_vmpa(&start, &pos); instr = g_raw_instruction_new_array(content, MDS_16_BITS, 1, &pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Pading")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -227,7 +219,6 @@ static bool annotate_dex_try_item(const GDexFormat *format, vmpa2t *pos) bool result; /* Bilan à retourner */ GBinContent *content; /* Contenu binaire à lire */ SourceEndian endian; /* Boutisme utilisé */ - vmpa2t start; /* Localisation des symboles */ GArchInstruction *instr; /* Instruction décodée */ GArchOperand *operand; /* Opérande à venir modifier */ GDbComment *comment; /* Définition de commentaire */ @@ -242,14 +233,13 @@ static bool annotate_dex_try_item(const GDexFormat *format, vmpa2t *pos) /* start_addr */ - 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, _("Start address of the block of code covered by this entry")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -257,27 +247,25 @@ static bool annotate_dex_try_item(const GDexFormat *format, vmpa2t *pos) /* insn_count */ - 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, _("Number of 16-bit code units covered by this entry")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* handler_off */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_array(content, MDS_16_BITS, 1, pos, endian); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Offset to the encoded_catch_handler for this entry")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -307,7 +295,6 @@ static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *format, vm { 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 */ @@ -320,14 +307,13 @@ static bool annotate_dex_encoded_catch_handler_list(const GDexFormat *format, vm /* 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, _("Size of the list, in entries")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -368,7 +354,6 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t { 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 */ @@ -382,14 +367,13 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t /* size */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_sleb128(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); @@ -413,14 +397,13 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t if (has_catch_all) { - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Bytecode address of the catch-all handler")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); @@ -451,7 +434,6 @@ static bool annotate_dex_encoded_catch_handler(const GDexFormat *format, vmpa2t static bool annotate_dex_encoded_type_addr_pair(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 */ @@ -462,27 +444,25 @@ static bool annotate_dex_encoded_type_addr_pair(const GDexFormat *format, vmpa2t /* type_idx */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_DEC); asprintf(&text, _("Index for the type of the exception to catch")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); /* addr */ - copy_vmpa(&start, pos); instr = g_raw_instruction_new_uleb128(content, pos); SET_IMM_DISPLAY(instr, operand, 0, IOD_HEX); asprintf(&text, _("Bytecode address of the associated exception handler")); - ADD_RAW_AS_SYM(format, symbol, &start, instr, comment, text); + ADD_RAW_AS_SYM(format, symbol, instr, comment, text); free(text); |