diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-07-01 11:52:52 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-07-01 11:52:52 (GMT) |
commit | 5dcd05f19ac62f6ff922176cd0ae6f8839910f2e (patch) | |
tree | 6fbf5798a57ab6874b68b6ea523619481013c814 /src/analysis/binary.c | |
parent | 51dff92af8ca82ac1cce3f74be70c3705ca88683 (diff) |
Built the graph view when defining a target address.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@247 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r-- | src/analysis/binary.c | 20 |
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; } |