summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-08-06 20:29:20 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-08-06 20:29:20 (GMT)
commitfc49e98dc2b3e0ae08a5874ecacaef046a0f3ec1 (patch)
treee121c5eb5dd0629554a498f8e1a1cce3fc0715b4 /src/analysis/disass
parentfacec716100f598a8694889274a4589c75c14722 (diff)
Saved progress toward the Android permissions display.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@258 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/disassembler.c14
-rw-r--r--src/analysis/disass/disassembler.h2
2 files changed, 7 insertions, 9 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;
-
}
diff --git a/src/analysis/disass/disassembler.h b/src/analysis/disass/disassembler.h
index 54da069..2c5adef 100644
--- a/src/analysis/disass/disassembler.h
+++ b/src/analysis/disass/disassembler.h
@@ -31,7 +31,7 @@
/* Procède à la décompilation des routines d'un fichier donné. */
-GCodeBuffer *disassemble_binary(GOpenidaBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **);
+void disassemble_binary(GOpenidaBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **, GCodeBuffer **);