summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/processor.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-12-16 21:13:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-12-16 21:13:42 (GMT)
commit04dfbc68e7cd5036017f097a67ba5f0288ddace0 (patch)
tree2cf10137c3c47c1c0877c67b48f7aeb86d9cbfcb /src/arch/arm/v7/processor.c
parenta1c2bc0c3b6f4b4fda9c50beeb09a1f699419e2a (diff)
Created operands for resolving symbols in disassembly code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@442 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7/processor.c')
-rw-r--r--src/arch/arm/v7/processor.c28
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;
}