summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/binary.c18
-rw-r--r--src/analysis/decomp/decompiler.c2
-rw-r--r--src/analysis/disass/disassembler.c21
-rw-r--r--src/analysis/disass/disassembler.h2
4 files changed, 23 insertions, 20 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index 2b84b57..21b4b14 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -48,7 +48,7 @@
#include "../debug/break.h"
#include "../format/format.h"
#include "../gui/panels/log.h"
-#include "../plugins/pglist.h"
+#include "../plugins/pglist.h" /* TODO : supprimer ? */
#include "../format/dbg_format.h"
@@ -1001,8 +1001,7 @@ bin_t *map_binary_file(const char *filename, off_t *length)
void ack_completed_disassembly(void/*GDelayedDisassembly*/ *disass, GOpenidaBinary *binary)
{
GRenderingLine *line; /* "Première" ligne de rendu */
- GPluginModule **pglist; /* Liste de greffons */
- size_t pgcount; /* Taille de cette liste */
+
size_t i; /* Boucle de parcours */
const char * const *files; /* Liste de fichiers source */
@@ -1034,19 +1033,6 @@ void ack_completed_disassembly(void/*GDelayedDisassembly*/ *disass, GOpenidaBina
g_exe_format_get_entry_point(binary->format));
if (line != NULL) g_rendering_line_add_flag(line, RLF_ENTRY_POINT);
- /* Action post-désassemblage */
-
- pglist = get_all_plugins_for_action(PGA_CODE_PROCESS, &pgcount);
-
- if (pgcount > 0)
- {
- for (i = 0; i < pgcount; i++)
- g_plugin_module_execute_action_on_binary(pglist[i], binary, PGA_CODE_PROCESS);
-
- free(pglist);
-
- }
-
/* On réintègre le flot premier */
#endif
diff --git a/src/analysis/decomp/decompiler.c b/src/analysis/decomp/decompiler.c
index 24cd242..42dc1ff 100644
--- a/src/analysis/decomp/decompiler.c
+++ b/src/analysis/decomp/decompiler.c
@@ -152,8 +152,6 @@ static void prepare_all_routines_for_decomp(const GOpenidaBinary *binary, const
{
context = g_arch_processor_get_decomp_context(proc);
- printf(" -- %s --\n", g_binary_routine_get_name(routines[i]));
-
instr = g_binary_format_decompile_routine(G_BIN_FORMAT(format), routines[i], context);
if (context != NULL)
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index dc374db..75e411f 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -40,6 +40,7 @@
#include "../../format/format.h"
#include "../../glibext/delayed-int.h"
#include "../../gui/panels/log.h"
+#include "../../plugins/pglist.h"
@@ -379,13 +380,18 @@ static void build_disass_prologue(GCodeBuffer *buffer, const char *filename, con
* *
******************************************************************************/
-GCodeBuffer *disassemble_binary(const GOpenidaBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs)
+GCodeBuffer *disassemble_binary(GOpenidaBinary *binary, GBinPart **parts, size_t parts_count, GArchInstruction **instrs)
{
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 */
GWorkQueue *queue; /* Gestionnaire de différés */
+ GPluginModule **pglist; /* Liste de greffons */
+ size_t pgcount; /* Taille de cette liste */
+ size_t i; /* Boucle de parcours */
+
+ /* Déroulement de l'opération principale */
result = g_code_buffer_new();
@@ -403,6 +409,19 @@ GCodeBuffer *disassemble_binary(const GOpenidaBinary *binary, GBinPart **parts,
g_object_unref(G_OBJECT(disass));
+ /* Actions post-désassemblage */
+
+ pglist = get_all_plugins_for_action(PGA_DISASS_PROCESS, &pgcount);
+
+ if (pgcount > 0)
+ {
+ for (i = 0; i < pgcount; i++)
+ g_plugin_module_execute_action_on_binary(pglist[i], binary, PGA_DISASS_PROCESS);
+
+ free(pglist);
+
+ }
+
return result;
}
diff --git a/src/analysis/disass/disassembler.h b/src/analysis/disass/disassembler.h
index 2a0f72a..54da069 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(const GOpenidaBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **);
+GCodeBuffer *disassemble_binary(GOpenidaBinary *, GBinPart **parts, size_t parts_count, GArchInstruction **);