summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/devdbg/speed.c10
-rw-r--r--plugins/devdbg/speed.h2
-rw-r--r--plugins/libcsem/semantic.c10
-rw-r--r--plugins/libcsem/semantic.h2
-rw-r--r--plugins/pychrysalide/plugin.c16
-rw-r--r--src/analysis/disass/disassembler.c16
-rw-r--r--src/plugins/pglist.h4
-rw-r--r--src/plugins/plugin-int.h2
-rw-r--r--src/plugins/plugin.c6
-rw-r--r--src/plugins/plugin.h2
10 files changed, 40 insertions, 30 deletions
diff --git a/plugins/devdbg/speed.c b/plugins/devdbg/speed.c
index f967e43..f9fccfe 100644
--- a/plugins/devdbg/speed.c
+++ b/plugins/devdbg/speed.c
@@ -50,9 +50,11 @@ typedef struct _speed_measure
/******************************************************************************
* *
-* Paramètres : plugin = greffon à manipuler. *
-* action = type d'action attendue. *
-* binary = binaire dont le contenu est en cours de traitement. *
+* Paramètres : plugin = greffon à manipuler. *
+* action = type d'action attendue. *
+* binary = binaire dont le contenu est en cours de traitement.*
+* status = barre de statut à tenir informée. *
+* context = contexte de désassemblage. *
* *
* Description : Exécute une action pendant un désassemblage de binaire. *
* *
@@ -62,7 +64,7 @@ typedef struct _speed_measure
* *
******************************************************************************/
-G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *plugin, PluginAction action, GLoadedBinary *binary)
+G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *plugin, PluginAction action, GLoadedBinary *binary, GtkStatusStack *status, GProcContext *context)
{
speed_measure *measure; /* Suivi des progressions */
diff --git a/plugins/devdbg/speed.h b/plugins/devdbg/speed.h
index 129f373..4367570 100644
--- a/plugins/devdbg/speed.h
+++ b/plugins/devdbg/speed.h
@@ -31,7 +31,7 @@
/* Exécute une action pendant un désassemblage de binaire. */
-G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *, PluginAction , GLoadedBinary *);
+G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *, PluginAction , GLoadedBinary *, GtkStatusStack *, GProcContext *);
diff --git a/plugins/libcsem/semantic.c b/plugins/libcsem/semantic.c
index 4c5636b..0dc330e 100644
--- a/plugins/libcsem/semantic.c
+++ b/plugins/libcsem/semantic.c
@@ -39,9 +39,11 @@ DEFINE_CHRYSALIDE_ACTIVE_PLUGIN("LibC semantics", "Register semantic information
/******************************************************************************
* *
-* Paramètres : plugin = greffon à manipuler. *
-* action = type d'action attendue. *
-* binary = binaire dont le contenu est en cours de traitement. *
+* Paramètres : plugin = greffon à manipuler. *
+* action = type d'action attendue. *
+* binary = binaire dont le contenu est en cours de traitement.*
+* status = barre de statut à tenir informée. *
+* context = contexte de désassemblage. *
* *
* Description : Exécute une action pendant un désassemblage de binaire. *
* *
@@ -51,7 +53,7 @@ DEFINE_CHRYSALIDE_ACTIVE_PLUGIN("LibC semantics", "Register semantic information
* *
******************************************************************************/
-G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *plugin, PluginAction action, GLoadedBinary *binary)
+G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *plugin, PluginAction action, GLoadedBinary *binary, GtkStatusStack *status, GProcContext *context)
{
if (action == PGA_DISASSEMBLY_HOOKED_POST)
{
diff --git a/plugins/libcsem/semantic.h b/plugins/libcsem/semantic.h
index 22ee6e3..ff92bab 100644
--- a/plugins/libcsem/semantic.h
+++ b/plugins/libcsem/semantic.h
@@ -31,7 +31,7 @@
/* Exécute une action pendant un désassemblage de binaire. */
-G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *, PluginAction, GLoadedBinary *);
+G_MODULE_EXPORT void process_binary_disassembly(const GPluginModule *, PluginAction, GLoadedBinary *, GtkStatusStack *, GProcContext *);
diff --git a/plugins/pychrysalide/plugin.c b/plugins/pychrysalide/plugin.c
index 38d8785..f8b4fc8 100644
--- a/plugins/pychrysalide/plugin.c
+++ b/plugins/pychrysalide/plugin.c
@@ -89,7 +89,7 @@ static void g_python_plugin_handle_binary_content(const GPythonPlugin *, PluginA
FormatMatchStatus python_plugin_is_matching(GBinContent *, GExeFormat *, GPythonPlugin *, char **);
/* Exécute une action pendant un désassemblage de binaire. */
-static void g_python_plugin_process_disass(const GPythonPlugin *, PluginAction, GLoadedBinary *);
+static void g_python_plugin_process_disass(const GPythonPlugin *, PluginAction, GLoadedBinary *, GtkStatusStack *, GProcContext *);
@@ -763,9 +763,11 @@ FormatMatchStatus python_plugin_is_matching(GBinContent *content, GExeFormat *pa
/******************************************************************************
* *
-* Paramètres : plugin = greffon à manipuler. *
-* action = type d'action attendue. *
-* binary = binaire dont le contenu est en cours de traitement. *
+* Paramètres : plugin = greffon à manipuler. *
+* action = type d'action attendue. *
+* binary = binaire dont le contenu est en cours de traitement.*
+* status = barre de statut à tenir informée. *
+* context = contexte de désassemblage. *
* *
* Description : Exécute une action pendant un désassemblage de binaire. *
* *
@@ -775,15 +777,17 @@ FormatMatchStatus python_plugin_is_matching(GBinContent *content, GExeFormat *pa
* *
******************************************************************************/
-static void g_python_plugin_process_disass(const GPythonPlugin *plugin, PluginAction action, GLoadedBinary *binary)
+static void g_python_plugin_process_disass(const GPythonPlugin *plugin, PluginAction action, GLoadedBinary *binary, GtkStatusStack *status, GProcContext *context)
{
PyObject *args; /* Arguments pour l'appel */
PyObject *value; /* Valeurs obtenues */
- args = PyTuple_New(2);
+ args = PyTuple_New(4);
PyTuple_SetItem(args, 0, PyLong_FromUnsignedLong(action));
PyTuple_SetItem(args, 1, pygobject_new(G_OBJECT(binary)));
+ PyTuple_SetItem(args, 2, pygobject_new(G_OBJECT(status)));
+ PyTuple_SetItem(args, 3, pygobject_new(G_OBJECT(context)));
value = run_python_method(plugin->instance, "process_binary_disassembly", args);
diff --git a/src/analysis/disass/disassembler.c b/src/analysis/disass/disassembler.c
index a88ba1e..6e71ed6 100644
--- a/src/analysis/disass/disassembler.c
+++ b/src/analysis/disass/disassembler.c
@@ -261,7 +261,7 @@ static void compute_disassembly(GLoadedBinary *binary, GProcContext *context, wg
g_arch_processor_set_instructions(proc, instrs, count);
- process_disassembly_event(PGA_DISASSEMBLY_RAW, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_RAW, binary, status, context);
}
@@ -275,7 +275,7 @@ static void compute_disassembly(GLoadedBinary *binary, GProcContext *context, wg
g_instructions_study_do_link_operation,
proc, context, format);
- process_disassembly_event(PGA_DISASSEMBLY_HOOKED_LINK, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_HOOKED_LINK, binary, status, context);
}
@@ -287,7 +287,7 @@ static void compute_disassembly(GLoadedBinary *binary, GProcContext *context, wg
g_instructions_study_do_post_operation,
proc, context, format);
- process_disassembly_event(PGA_DISASSEMBLY_HOOKED_POST, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_HOOKED_POST, binary, status, context);
/**
* Quatrième étape : établissement des couvertures de routines restantes.
@@ -297,7 +297,7 @@ static void compute_disassembly(GLoadedBinary *binary, GProcContext *context, wg
_("Finding remaining limits..."),
g_routines_study_compute_limits, proc, G_BIN_FORMAT(format));
- process_disassembly_event(PGA_DISASSEMBLY_LIMITED, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_LIMITED, binary, status, context);
/**
* Cinquième étape : liaisons entre instructions.
@@ -309,7 +309,7 @@ static void compute_disassembly(GLoadedBinary *binary, GProcContext *context, wg
g_instructions_study_establish_links,
proc, context, format);
- process_disassembly_event(PGA_DISASSEMBLY_LINKED, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_LINKED, binary, status, context);
}
@@ -321,7 +321,7 @@ static void compute_disassembly(GLoadedBinary *binary, GProcContext *context, wg
_("Control-flow analysis for routines..."),
g_routines_study_handle_blocks, proc, G_BIN_FORMAT(format));
- process_disassembly_event(PGA_DISASSEMBLY_GROUPED, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_GROUPED, binary, status, context);
/**
* Nettoyage final et sortie !
@@ -355,7 +355,7 @@ void disassemble_binary(GLoadedBinary *binary, wgroup_id_t gid, GtkStatusStack *
/* Préparatifs */
- process_disassembly_event(PGA_DISASSEMBLY_STARTED, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_STARTED, binary, status, NULL);
proc = g_loaded_binary_get_processor(binary);
@@ -367,7 +367,7 @@ void disassemble_binary(GLoadedBinary *binary, wgroup_id_t gid, GtkStatusStack *
compute_disassembly(binary, *context, gid, status);
- process_disassembly_event(PGA_DISASSEMBLY_ENDED, binary);
+ process_disassembly_event(PGA_DISASSEMBLY_ENDED, binary, status, *context);
}
diff --git a/src/plugins/pglist.h b/src/plugins/pglist.h
index 4c8194d..20f0031 100644
--- a/src/plugins/pglist.h
+++ b/src/plugins/pglist.h
@@ -103,8 +103,8 @@ GPluginModule **get_all_plugins_for_action(PluginAction, size_t *);
/* DPS_DISASSEMBLY */
-#define process_disassembly_event(a, b) \
- process_all_plugins_for(a, g_plugin_module_process_disassembly_event, b)
+#define process_disassembly_event(a, b, s, c) \
+ process_all_plugins_for(a, g_plugin_module_process_disassembly_event, b, s, c)
diff --git a/src/plugins/plugin-int.h b/src/plugins/plugin-int.h
index 4625ec7..ee7c442 100644
--- a/src/plugins/plugin-int.h
+++ b/src/plugins/plugin-int.h
@@ -41,7 +41,7 @@
typedef bool (* pg_management_fc) (GPluginModule *);
/* Exécute une action pendant un désassemblage de binaire. */
-typedef void (* pg_process_disassembly_fc) (const GPluginModule *, PluginAction, GLoadedBinary *);
+typedef void (* pg_process_disassembly_fc) (const GPluginModule *, PluginAction, GLoadedBinary *, GtkStatusStack *, GProcContext *);
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index c74043d..3d1350d 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -777,6 +777,8 @@ bool g_plugin_module_preload_binary_format(const GPluginModule *plugin, PluginAc
* Paramètres : plugin = greffon à manipuler. *
* action = type d'action attendue. *
* binary = binaire dont le contenu est en cours de traitement. *
+* status = barre de statut à tenir informée. *
+* context = contexte de désassemblage. *
* *
* Description : Exécute une action pendant un désassemblage de binaire. *
* *
@@ -786,8 +788,8 @@ bool g_plugin_module_preload_binary_format(const GPluginModule *plugin, PluginAc
* *
******************************************************************************/
-void g_plugin_module_process_disassembly_event(const GPluginModule *plugin, PluginAction action, GLoadedBinary *binary)
+void g_plugin_module_process_disassembly_event(const GPluginModule *plugin, PluginAction action, GLoadedBinary *binary, GtkStatusStack *status, GProcContext *context)
{
- plugin->process_disass(plugin, action, binary);
+ plugin->process_disass(plugin, action, binary, status, context);
}
diff --git a/src/plugins/plugin.h b/src/plugins/plugin.h
index 5837078..17a9f33 100644
--- a/src/plugins/plugin.h
+++ b/src/plugins/plugin.h
@@ -101,7 +101,7 @@ bool g_plugin_module_handle_binary_format(const GPluginModule *, PluginAction, G
bool g_plugin_module_preload_binary_format(const GPluginModule *, PluginAction, GBinFormat *, GPreloadInfo *, GtkStatusStack *);
/* Exécute une action pendant un désassemblage de binaire. */
-void g_plugin_module_process_disassembly_event(const GPluginModule *, PluginAction, GLoadedBinary *);
+void g_plugin_module_process_disassembly_event(const GPluginModule *, PluginAction, GLoadedBinary *, GtkStatusStack *, GProcContext *);