summaryrefslogtreecommitdiff
path: root/src/analysis/disass
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-03 23:21:49 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-03 23:21:49 (GMT)
commit425860b441b21e4aca7bf2473be26b0fe1e756e2 (patch)
tree341a0fc8b370d76566f3e332c344ffae5c065916 /src/analysis/disass
parent5511e355e7810f06bd610b79bcc94402c88d7ec9 (diff)
Removed all references to binary parts (GBinPart) and updated the code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@465 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/disass')
-rw-r--r--src/analysis/disass/disassembler.c16
-rw-r--r--src/analysis/disass/disassembler.h3
-rw-r--r--src/analysis/disass/macro.c1
3 files changed, 6 insertions, 14 deletions
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index 126c116..ac6eb5b 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -58,9 +58,6 @@ struct _GDelayedDisassembly
GLoadedBinary *binary; /* Destinataire final */
GExeFormat *format; /* Format du binaire représenté*/
- GBinPart **parts; /* Parties binaires à traiter */
- size_t count; /* Nombre de ces parties */
-
GArchInstruction **instrs; /* Instructions résultantes */
GCodeBuffer *buffer; /* Tampon pour le rendu */
@@ -81,7 +78,7 @@ static void g_delayed_disassembly_class_init(GDelayedDisassemblyClass *);
static void g_delayed_disassembly_init(GDelayedDisassembly *);
/* Crée une tâche de désassemblage différé. */
-static GDelayedDisassembly *g_delayed_disassembly_new(GLoadedBinary *, GBinPart **, size_t, GArchInstruction **, GCodeBuffer *);
+static GDelayedDisassembly *g_delayed_disassembly_new(GLoadedBinary *, GArchInstruction **, GCodeBuffer *);
/* Assure le désassemblage en différé. */
static void g_delayed_disassembly_process(GDelayedDisassembly *, GtkExtStatusBar *);
@@ -146,8 +143,6 @@ static void g_delayed_disassembly_init(GDelayedDisassembly *disass)
* *
* Paramètres : binary = binaire chargé en attente des résultats. *
* format = format du binaire représenté. *
-* parts = parties binaires à désassembler. *
-* count = nombre de parties à traiter. *
* instrs = emplacement pour la liste d'instructions. *
* buffer = tampon de sortie pour les instructions. *
* *
@@ -159,7 +154,7 @@ static void g_delayed_disassembly_init(GDelayedDisassembly *disass)
* *
******************************************************************************/
-static GDelayedDisassembly *g_delayed_disassembly_new(GLoadedBinary *binary, GBinPart **parts, size_t count, GArchInstruction **instrs, GCodeBuffer *buffer)
+static GDelayedDisassembly *g_delayed_disassembly_new(GLoadedBinary *binary, GArchInstruction **instrs, GCodeBuffer *buffer)
{
GDelayedDisassembly *result; /* Tâche à retourner */
@@ -168,9 +163,6 @@ static GDelayedDisassembly *g_delayed_disassembly_new(GLoadedBinary *binary, GBi
result->binary = binary;
result->format = g_loaded_binary_get_format(binary);
- result->parts = parts;
- result->count = count;
-
result->instrs = instrs;
result->buffer = buffer;
@@ -538,7 +530,7 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con
* *
******************************************************************************/
-void disassemble_binary(GLoadedBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs, GCodeBuffer **buffer, disassembly_ack_fc ack)
+void disassemble_binary(GLoadedBinary *binary, GArchInstruction **instrs, GCodeBuffer **buffer, disassembly_ack_fc ack)
{
const uint8_t *data; /* Données binaires brutes */
off_t length; /* Quantité de ces données */
@@ -550,7 +542,7 @@ void disassemble_binary(GLoadedBinary *binary, GBinPart **parts, size_t parts_co
data = g_loaded_binary_get_data(binary, &length);
build_disass_prologue(*buffer, g_loaded_binary_get_name(binary, true), data, length);
- disass = g_delayed_disassembly_new(binary, parts, parts_count, instrs, *buffer);
+ disass = g_delayed_disassembly_new(binary, instrs, *buffer);
g_signal_connect(disass, "work-completed", G_CALLBACK(ack), binary);
queue = get_work_queue();
diff --git a/src/analysis/disass/disassembler.h b/src/analysis/disass/disassembler.h
index 46bd3cc..4e459a1 100644
--- a/src/analysis/disass/disassembler.h
+++ b/src/analysis/disass/disassembler.h
@@ -26,7 +26,6 @@
#include "../binary.h"
-#include "../../format/part.h"
@@ -60,7 +59,7 @@ GType g_delayed_disassembly_get_type(void);
typedef void (* disassembly_ack_fc) (GDelayedDisassembly *, GLoadedBinary *);
/* Procède à la décompilation des routines d'un fichier donné. */
-void disassemble_binary(GLoadedBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **, GCodeBuffer **, disassembly_ack_fc);
+void disassemble_binary(GLoadedBinary *, GArchInstruction **, GCodeBuffer **, disassembly_ack_fc);
diff --git a/src/analysis/disass/macro.c b/src/analysis/disass/macro.c
index 9addf1e..3745f25 100644
--- a/src/analysis/disass/macro.c
+++ b/src/analysis/disass/macro.c
@@ -25,6 +25,7 @@
#include <malloc.h>
+#include <stdlib.h>
#include <string.h>