diff options
Diffstat (limited to 'src/arch/arm/v7/processor.c')
-rw-r--r-- | src/arch/arm/v7/processor.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/arch/arm/v7/processor.c b/src/arch/arm/v7/processor.c index dac9639..2b8617b 100644 --- a/src/arch/arm/v7/processor.c +++ b/src/arch/arm/v7/processor.c @@ -200,7 +200,7 @@ GArmV7Processor *g_armv7_processor_new(void) * Remarques : - * * * ******************************************************************************/ - +#include "post.h" static GArchInstruction *g_armv7_processor_disassemble(const GArmV7Processor *proc, GArmContext *ctx, const bin_t *data, vmpa2t *pos, phys_t end) { GArchInstruction *result; /* Instruction à renvoyer */ @@ -209,6 +209,9 @@ static GArchInstruction *g_armv7_processor_disassemble(const GArmV7Processor *pr uint16_t raw16; /* Donnée 16 bits à analyser */ uint32_t raw32; /* Donnée 32 bits à analyser */ + + + start = get_phy_addr(pos); diff = 4; @@ -258,6 +261,29 @@ 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_post_prod_function(result, post_process_thumb_instruction_bl); + + + + } + + if (strcmp(g_arch_instruction_get_keyword(result, 0), "blx") == 0/* && pc == 0x000085b2*/) + { + + g_arch_instruction_set_post_prod_function(result, post_process_thumb_instruction_blx); + + + } + + return result; } |