summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/processor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik/processor.c')
-rw-r--r--src/arch/dalvik/processor.c28
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: