summaryrefslogtreecommitdiff
path: root/src/analysis/db/items
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-04-13 16:34:34 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-04-13 16:34:34 (GMT)
commit6906aa19b7ac4c14615c30d15bfb26b0b86557d5 (patch)
treef0fb0b6ea116e4ec87f33b3b4198f6dc4c88766c /src/analysis/db/items
parentacc7b5f33e93bae3bf43e8f029976b7f74260b52 (diff)
Simplified the way links between instructions are handled.
Diffstat (limited to 'src/analysis/db/items')
-rw-r--r--src/analysis/db/items/comment.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index 263f415..b43c1e6 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -581,9 +581,9 @@ static bool g_db_comment_run(GDbComment *comment, GLoadedBinary *binary, bool ap
size_t index; /* Point d'insertion */
GArchProcessor *proc; /* Propriétaire d'instructions */
GArchInstruction *instr; /* Instruction à traiter */
- instr_link_t *sources; /* Instructions diverses liées */
size_t scount; /* Nbre de sources affichées */
size_t i; /* Boucle de parcours */
+ instr_link_t *source; /* Instruction diverse liée */
const mrange_t *range; /* Emplacement d'instruction */
size_t linked; /* Indice lié à traiter */
@@ -631,7 +631,7 @@ static bool g_db_comment_run(GDbComment *comment, GLoadedBinary *binary, bool ap
instr = g_arch_processor_find_instr_by_address(proc, &comment->addr);
assert(instr != NULL);
- scount = g_arch_instruction_get_sources(instr, &sources);
+ scount = g_arch_instruction_count_sources(instr);
if (apply)
{
@@ -642,7 +642,9 @@ static bool g_db_comment_run(GDbComment *comment, GLoadedBinary *binary, bool ap
for (i = 0; i < scount && result; i++)
{
- range = g_arch_instruction_get_range(sources[i].linked);
+ source = g_arch_instruction_get_source(instr, i);
+
+ range = g_arch_instruction_get_range(source->linked);
/**
* On recherche ici une ligne potentiellement BLF_HAS_CODE ou BLF_IS_LABEL.