summaryrefslogtreecommitdiff
path: root/src/analysis/disass/disassembler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/disass/disassembler.c')
-rw-r--r--src/analysis/disass/disassembler.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index 75e411f..872dc09 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -371,18 +371,18 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con
* parts = parties binaires à désassembler. *
* count = nombre de parties à traiter. *
* instrs = liste des instructions chargées. [OUT] *
+* buffer = tampon de code mis en place. [OUT] *
* *
* Description : Procède au désassemblage d'un contenu binaire donné. *
* *
-* Retour : Tampon de code mis en place. *
+* Retour : - *
* *
* Remarques : - *
* *
******************************************************************************/
-GCodeBuffer *disassemble_binary(GOpenidaBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs)
+void disassemble_binary(GOpenidaBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs, GCodeBuffer **buffer)
{
- GCodeBuffer *result; /* Tampon constitué à renvoyer */
const uint8_t *data; /* Données binaires brutes */
off_t length; /* Quantité de ces données */
GDelayedDisassembly *disass; /* Désassemblage à mener */
@@ -393,12 +393,12 @@ GCodeBuffer *disassemble_binary(GOpenidaBinary *binary, GBinPart **parts, size_t
/* Déroulement de l'opération principale */
- result = g_code_buffer_new();
+ *buffer = g_code_buffer_new();
data = g_openida_binary_get_data(binary, &length);
- build_disass_prologue(result, g_openida_binary_get_filename(binary), data, length);
+ build_disass_prologue(*buffer, g_openida_binary_get_filename(binary), data, length);
- disass = g_delayed_disassembly_new(binary, parts, parts_count, result);
+ disass = g_delayed_disassembly_new(binary, parts, parts_count, *buffer);
queue = get_work_queue();
g_work_queue_schedule_work(queue, G_DELAYED_WORK(disass));
@@ -422,6 +422,4 @@ GCodeBuffer *disassemble_binary(GOpenidaBinary *binary, GBinPart **parts, size_t
}
- return result;
-
}