diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-01-10 16:37:34 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-01-10 16:37:34 (GMT) |
commit | 8ef66a1e0225c9e00175fbaf3f3038f537de511f (patch) | |
tree | dd7112dd50c02e0ad1565ce7a890991b5e1270c6 /src/arch/arm/v7/processor.c | |
parent | cc3e31eecd90766ae4f0bb391428c5c59567ef4c (diff) |
Extended the grammar to allow hooks inclusion.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@453 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7/processor.c')
-rw-r--r-- | src/arch/arm/v7/processor.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/arch/arm/v7/processor.c b/src/arch/arm/v7/processor.c index 45b53ae..d83c36d 100644 --- a/src/arch/arm/v7/processor.c +++ b/src/arch/arm/v7/processor.c @@ -240,31 +240,14 @@ static GArchInstruction *g_armv7_processor_disassemble(const GArmV7Processor *pr phys_t diff; /* Avancée dans la lecture */ uint16_t raw16; /* Donnée 16 bits à analyser */ uint32_t raw32; /* Donnée 32 bits à analyser */ - - - - - - - - ArmV7InstrSet iset; - - + ArmV7InstrSet iset; /* Type de jeu d'instructions */ iset = g_armv7_context_find_encoding(ctx, get_virt_addr(pos)); - - - printf(" --decoding-- 0x%08x -> %u\n", - (unsigned int)get_virt_addr(pos), - (unsigned int)iset); - - start = get_phy_addr(pos); diff = 4; - switch (iset) { case AV7IS_ARM: @@ -319,31 +302,6 @@ static GArchInstruction *g_armv7_processor_disassemble(const GArmV7Processor *pr result = g_raw_instruction_new_array(data, MDS_32_BITS, 1, pos, end, G_ARCH_PROCESSOR(proc)->endianness); - - - - - if (strcmp(g_arch_instruction_get_keyword(result, 0), "bl") == 0/* && pc == 0x000085b2*/) - { - - - g_arch_instruction_set_hook(result, IPH_LINK, (instr_hook_fc)handle_links_with_thumb_instruction_bl); - g_arch_instruction_set_hook(result, IPH_POST, post_process_branch_instructions); - - - - } - - if (strcmp(g_arch_instruction_get_keyword(result, 0), "blx") == 0/* && pc == 0x000085b2*/) - { - - g_arch_instruction_set_hook(result, IPH_LINK, (instr_hook_fc)handle_links_with_thumb_instruction_blx); - g_arch_instruction_set_hook(result, IPH_POST, post_process_branch_instructions); - - - } - - return result; } |