diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-08-12 19:05:31 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-08-12 19:05:31 (GMT) |
commit | 4b2f65ed2125cd7b6ef598cf02738f6c839d8935 (patch) | |
tree | de62e9daaafe63248c45202004758e91b7341cc5 /src/core/formats.h | |
parent | b5c6bcea25b1b840fd6c8e89a4a3c9fbd83ba84b (diff) |
Extended the loading process of binary formats to prepare the DWARF support.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@568 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/core/formats.h')
-rw-r--r-- | src/core/formats.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/core/formats.h b/src/core/formats.h index bc16f01..8857217 100644 --- a/src/core/formats.h +++ b/src/core/formats.h @@ -30,17 +30,22 @@ #include "../format/format.h" +#include "../format/executable.h" + /* Indication à propos du support d'un format */ -typedef bool (* format_match_fc) (GBinContent *); +typedef const char * (* format_match_fc) (GBinContent *, GExeFormat *); /* Méthode de chargement d'un format */ -typedef GBinFormat * (* format_load_fc) (GBinContent *); +typedef GBinFormat * (* format_load_fc) (GBinContent *, GExeFormat *); + +/* Enregistre un détection de format(s) binaire(s). */ +bool register_format_matcher(format_match_fc); /* Enregistre un format de contenu binaire donné. */ -bool register_format_type(const char *, const char *, format_match_fc, format_load_fc); +bool register_format_loader(const char *, const char *, format_load_fc); /* Charge les définitions de formats "natifs". */ bool load_hard_coded_formats_definitions(void); @@ -52,10 +57,10 @@ void unload_formats_definitions(void); const char *get_binary_format_name(const char *); /* Identifie un format binaire par son contenu. */ -const char *find_matching_format(GBinContent *); +const char *find_matching_format(GBinContent *, GExeFormat *); /* Charge le format binaire correspondant à un type. */ -GBinFormat *load_new_named_format(const char *, GBinContent *); +GBinFormat *load_new_named_format(const char *, GBinContent *, GExeFormat *); |