diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-10-10 20:03:23 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-10-10 20:03:23 (GMT) |
commit | 8dff3daac4d2dc98b90adaecea834fb65db4fb10 (patch) | |
tree | 39a747f8fcdcbf525bb64a7e4173ff2a5b360d28 /src/arch/dalvik/processor.c | |
parent | f3e84729588f7e2e518f82116e908455d957f9ca (diff) |
Handled switch and fill-array data pseudo-instructions without plugin.
Diffstat (limited to 'src/arch/dalvik/processor.c')
-rw-r--r-- | src/arch/dalvik/processor.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/arch/dalvik/processor.c b/src/arch/dalvik/processor.c index ab64db7..9003d72 100644 --- a/src/arch/dalvik/processor.c +++ b/src/arch/dalvik/processor.c @@ -485,23 +485,31 @@ static GArchInstruction *g_dalvik_processor_disassemble(const GArchProcessor *pr }; + /* Données brutes associées à une instruction ? */ + + result = g_dalvik_context_get_raw_data(ctx, content, pos); + + if (result != NULL) goto gdpd_done; + + /* Pseudo-instruction... */ + if (!g_binary_content_read_u8(content, pos, &raw8)) return NULL; - /* Pseudo-instruction... */ result = g_dalvik_processor_disassemble_pseudo(proc, ctx, content, pos, raw8); + if (result != NULL) goto gdpd_done; + /* ... ou instruction classique */ - if (result == NULL) - { - assert(raw8 < DOP_COUNT); - id = (DalvikOpcodes)raw8; + assert(raw8 < DOP_COUNT); - if (decodings[id] != NULL) - result = decodings[id](proc, G_PROC_CONTEXT(ctx), content, pos, format); + id = (DalvikOpcodes)raw8; - } + if (decodings[id] != NULL) + result = decodings[id](proc, G_PROC_CONTEXT(ctx), content, pos, format); + + gdpd_done: return result; @@ -549,11 +557,11 @@ static GArchInstruction *g_dalvik_processor_disassemble_pseudo(const GArchProces { case DPO_PACKED_SWITCH: case DPO_SPARSE_SWITCH: - result = g_dalvik_switch_instr_new(ident, content, pos); + result = g_dalvik_switch_instr_new(ident, ctx, content, pos); break; case DPO_FILL_ARRAY_DATA: - result = g_dalvik_fill_instr_new(ident, content, pos); + result = g_dalvik_fill_instr_new(ident, ctx, content, pos); break; default: |