summaryrefslogtreecommitdiff
path: root/src/analysis/disass/fetch.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-09-17 21:36:49 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-09-17 21:36:49 (GMT)
commit65768127dea4c2760fe07cf843da7b4ad9e67da5 (patch)
treed0023eb7f378a4118fd074f3f61d5eae02e0882b /src/analysis/disass/fetch.c
parentaf083f8bd6da340214ae392451dde5782fb79039 (diff)
Introduced memory ranges.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@406 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/disass/fetch.c')
-rw-r--r--src/analysis/disass/fetch.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/analysis/disass/fetch.c b/src/analysis/disass/fetch.c
index 55ea1d4..763b37a 100644
--- a/src/analysis/disass/fetch.c
+++ b/src/analysis/disass/fetch.c
@@ -70,6 +70,7 @@ GArchInstruction *load_raw_binary(const GLoadedBinary *binary, const vmpa2t *bas
off_t old_phy; /* Ancienne position physique */
GArchInstruction *instr; /* Instruction décodée */
off_t new_phy; /* Nouvelle position physique */
+ mrange_t range; /* Couverture de l'instruction */
result = NULL;
@@ -90,8 +91,10 @@ GArchInstruction *load_raw_binary(const GLoadedBinary *binary, const vmpa2t *bas
if (instr == NULL) break;
new_phy = get_phy_addr(&pos);
+ init_mrange(&range, &prev, new_phy - old_phy);
+
+ g_arch_instruction_set_range(instr, &range);
- g_arch_instruction_set_location(instr, &prev, new_phy - old_phy);
g_arch_instruction_add_to_list(&result, instr);
copy_vmpa(&prev, &pos);
@@ -146,7 +149,7 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt
size_t i; /* Boucle de parcours */
-
+ const mrange_t *range; /* Couverture d'un symbole */
const vmpa2t *border; /* Nouvelle bordure rencontrée */
off_t length; /* Taille d'une partie traitée */
@@ -183,7 +186,14 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt
- border = g_binary_symbol_get_location(symbols[i], &length);
+
+ range = g_binary_symbol_get_range(symbols[i]);
+
+ border = get_mrange_addr(range);
+ length = get_mrange_length(range);
+
+
+
switch (g_binary_symbol_get_target_type(symbols[i]))
{