summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/db/items/comment.c5
-rw-r--r--src/analysis/disass/area.c3
-rw-r--r--src/analysis/disass/disassembler.c19
3 files changed, 13 insertions, 14 deletions
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index 3e1c06f..9368291 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -142,7 +142,7 @@ static int g_db_comment_contains_addr(const GDbComment *, const vmpa2t *, size_t
static BufferLineFlags g_db_comment_get_flags(const GDbComment *, size_t, size_t);
/* Imprime dans une ligne de rendu le contenu représenté. */
-static void g_db_comment_print(GDbComment *, GBufferLine *, size_t, size_t);
+static void g_db_comment_print(GDbComment *, GBufferLine *, size_t, size_t, const GBinContent *);
@@ -1382,6 +1382,7 @@ static BufferLineFlags g_db_comment_get_flags(const GDbComment *comment, size_t
* line = ligne de rendu à compléter. *
* index = indice de cette même ligne dans le tampon global. *
* repeat = indice d'utilisations successives du générateur. *
+* content = éventuel contenu binaire brut à imprimer. *
* *
* Description : Imprime dans une ligne de rendu le contenu représenté. *
* *
@@ -1391,7 +1392,7 @@ static BufferLineFlags g_db_comment_get_flags(const GDbComment *comment, size_t
* *
******************************************************************************/
-static void g_db_comment_print(GDbComment *comment, GBufferLine *line, size_t index, size_t repeat)
+static void g_db_comment_print(GDbComment *comment, GBufferLine *line, size_t index, size_t repeat, const GBinContent *content)
{
char *full; /* Contenu textuel complet */
size_t count; /* Quantité de ces lignes */
diff --git a/src/analysis/disass/area.c b/src/analysis/disass/area.c
index ed53b28..f4088e4 100644
--- a/src/analysis/disass/area.c
+++ b/src/analysis/disass/area.c
@@ -448,9 +448,6 @@ static bool mark_range_in_mem_area_as_processed(mem_area *area, GArchInstruction
area->instructions[offset] = instr;
g_atomic_pointer_add(&area->count, 1);
- /* Au passage, association du contenu */
- g_arch_instruction_set_global_content(instr, area->content);
-
mrimaap_exit:
/* Fin des choses sérieuses */
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index 0ffcccd..2f6b562 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -681,25 +681,28 @@ static void build_disass_prologue(GBufferCache *cache, const GBinFormat *format,
void disassemble_binary(GLoadedBinary *binary, GBufferCache **cache, disassembly_ack_fc ack)
{
GBinFormat *format; /* Format associé au binaire */
- GCodingLanguage *lang; /* Langage de sortie préféré */
GBinContent *content; /* Contenu bianire manipulé */
+ GCodingLanguage *lang; /* Langage de sortie préféré */
+ const char *desc; /* Désignation du binaire */
const gchar *checksum; /* Identifiant de binaire */
GDelayedDisassembly *disass; /* Désassemblage à mener */
GWorkQueue *queue; /* Gestionnaire de différés */
- *cache = g_buffer_cache_new();
-
format = G_BIN_FORMAT(g_loaded_binary_get_format(binary));
+ content = g_binary_format_get_content(format);
+
+ *cache = g_buffer_cache_new(content);
lang = g_asm_language_new();
- content = g_binary_format_get_content(format);
+ desc = g_binary_content_describe(content, true);
checksum = g_binary_content_get_checksum(content);
- g_object_unref(G_OBJECT(content));
- g_object_unref(G_OBJECT(format));
+ build_disass_prologue(*cache, format, lang, desc, checksum);
- build_disass_prologue(*cache, format, lang, g_binary_content_describe(content, true), checksum);
+ g_object_unref(G_OBJECT(lang));
+ g_object_unref(G_OBJECT(content));
+ g_object_unref(G_OBJECT(format));
disass = g_delayed_disassembly_new(binary, *cache);
g_signal_connect(disass, "work-completed", G_CALLBACK(ack), binary);
@@ -707,6 +710,4 @@ void disassemble_binary(GLoadedBinary *binary, GBufferCache **cache, disassembly
queue = get_work_queue();
g_work_queue_schedule_work(queue, G_DELAYED_WORK(disass), DEFAULT_WORK_GROUP);
- g_object_unref(G_OBJECT(lang));
-
}