summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-04-19 20:55:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-04-19 20:55:58 (GMT)
commit14d17285cdfae2fe6bd7df0e873ef11ef876e12c (patch)
tree477afb439b4b0872268cd5e59e7badf98d6052ab /src
parent2769384a97478f4901157b71e67ec33496dd75cf (diff)
Restricted instructions iterators to get routine contents.
Diffstat (limited to 'src')
-rw-r--r--src/arch/instriter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/instriter.c b/src/arch/instriter.c
index d968ba8..a603383 100644
--- a/src/arch/instriter.c
+++ b/src/arch/instriter.c
@@ -150,6 +150,16 @@ void delete_instruction_iterator(instr_iter_t *iter)
void restrict_instruction_iterator(instr_iter_t *iter, const mrange_t *range)
{
+ instr_iter_t *new; /* Itérateur actualisé */
+
+ new = g_arch_processor_get_iter_from_address(iter->proc, get_mrange_addr(range));
+
+ if (new)
+ {
+ iter->index = new->index;
+ delete_instruction_iterator(new);
+ }
+
copy_mrange(&iter->restriction, range);
iter->is_restricted = true;