summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-11 17:05:54 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-11 17:05:54 (GMT)
commitbf879f2562545ab7de23f9d38364b7bd4b43fb2c (patch)
tree6154160307cbca304ea9e1de178d8c2dfc8e0928 /src/plugins
parentabd96dbbe27246e9303173e5e2f47b2e4cedbcb7 (diff)
Registered all the supported formats in the system code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@471 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/pglist.h11
-rw-r--r--src/plugins/plugin-int.h10
2 files changed, 16 insertions, 5 deletions
diff --git a/src/plugins/pglist.h b/src/plugins/pglist.h
index fec31c2..d0176aa 100644
--- a/src/plugins/pglist.h
+++ b/src/plugins/pglist.h
@@ -49,8 +49,7 @@ const GPluginModule **get_all_plugins_for_action(PluginAction, size_t *);
* Définitions des opérations appliquables à une catégories de greffons.
*/
-#define process_all__plugins_for(a, f, ...) \
- do \
+#define process_all_plugins_for(a, f, ...) \
{ \
size_t __count; \
const GPluginModule **__list; \
@@ -61,10 +60,16 @@ const GPluginModule **get_all_plugins_for_action(PluginAction, size_t *);
} \
while (0)
+
+/* DPS_FORMAT / PGA_FORMAT_MATCHER */
+
+#define find_matching_format()
+
+
/* DPS_DISASSEMBLY */
#define process_disassembly_event(a, b) \
- process_all__plugins_for(a, g_plugin_module_process_disassembly_event, b)
+ process_all_plugins_for(a, g_plugin_module_process_disassembly_event, b)
diff --git a/src/plugins/plugin-int.h b/src/plugins/plugin-int.h
index 5f7eac2..7a3fb3e 100644
--- a/src/plugins/plugin-int.h
+++ b/src/plugins/plugin-int.h
@@ -34,6 +34,10 @@
+
+/* Indique si le format peut être pris en charge ici. */
+typedef bool (* pg_format_is_matching) (const GPluginModule *, GBinContent **);
+
/* Exécute une action pendant un désassemblage de binaire. */
typedef void (* pg_process_disassembly) (const GPluginModule *, PluginAction, GLoadedBinary *);
@@ -55,7 +59,7 @@ typedef void (* exit_plugin_fc) (GPluginModule *);
typedef PluginAction (* get_plugin_action_fc) (const GPluginModule *);
/* Identifie un format à associer à un contenu binaire. */
-typedef MatchingFormatAction (* is_matching_fc) (const GPluginModule *, char **, bin_t **, off_t *);
+//typedef MatchingFormatAction (* is_matching_fc) (const GPluginModule *, char **, bin_t **, off_t *);
/* Exécute une action définie sur un binaire chargé. */
typedef bool (* execute_action_on_binary_fc) (const GPluginModule *, GLoadedBinary *, PluginAction);
@@ -84,12 +88,14 @@ struct _GPluginModule
exit_plugin_fc exit; /* Procédure d'extinction */
get_plugin_action_fc get_action; /* Opération(s) menée(s) */
- is_matching_fc is_matching; /* Recherche de correspondance */
+ //is_matching_fc is_matching; /* Recherche de correspondance */
execute_action_on_binary_fc exec_on_bin;/* Action sur un binaire */
//execute_on_debugger_fc handle_debugger; /* Action liée à un débogueur */
+ pg_format_is_matching is_matching; /* Recherche de correspondance */
+
pg_process_disassembly proc_disass; /* Catégorie 'désassemblage' */
};