summaryrefslogtreecommitdiff
path: root/src/analysis/binary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r--src/analysis/binary.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index 53da917..45e6d31 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -96,6 +96,7 @@ struct _GOpenidaBinary
GRenderingLine *lines; /* Lignes de rendu en place */
GRenderingOptions *options; /* Options de désassemblage */
+ GArchInstruction *instrs; /* Instructions d'assemblage */
GCodeBuffer *disass_buffer; /* Instructions lisibles */
GCodeBuffer **dec_buffers; /* Sources sous forme de texte */
size_t decbuf_count; /* Taille des tableaux */
@@ -834,7 +835,7 @@ void g_openida_binary_analyse(GOpenidaBinary *binary)
}
}
- binary->disass_buffer = disassemble_binary(binary, parts, parts_count);
+ binary->disass_buffer = disassemble_binary(binary, parts, parts_count, &binary->instrs);
/* TODO : remme ! */
ack_completed_disassembly(NULL, binary);
@@ -993,22 +994,7 @@ GRenderingLine *g_openida_binary_get_lines(const GOpenidaBinary *binary)
GArchInstruction *g_openida_binary_get_instructions(const GOpenidaBinary *binary)
{
- GArchInstruction *result; /* Liste à renvoyer */
- GRenderingLine *iter; /* Boucle de parcours */
-
- result = NULL;
-
- for (iter = binary->lines;
- iter != NULL;
- iter = g_rendering_line_get_next_iter(binary->lines, iter, NULL))
- {
- if (G_IS_CODE_LINE(iter)) break;
- }
-
- if (iter != NULL)
- result = g_code_line_get_instruction(G_CODE_LINE(iter));
-
- return result;
+ return binary->instrs;
}