summaryrefslogtreecommitdiff
path: root/src/format/executable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/executable.c')
-rw-r--r--src/format/executable.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/format/executable.c b/src/format/executable.c
index 553b157..26c418e 100644
--- a/src/format/executable.c
+++ b/src/format/executable.c
@@ -174,7 +174,7 @@ void g_exe_format_add_debug_info(GExeFormat *format, GDbgFormat *info)
{
const char *desc; /* Description humaine associée*/
- desc = g_binary_format_get_description(G_BIN_FORMAT(info));
+ desc = g_known_format_get_description(G_KNOWN_FORMAT(info));
if (desc == NULL)
log_simple_message(LMT_WARNING, _("Unnamed debug information"));
@@ -313,20 +313,17 @@ bool g_exe_format_get_main_address(GExeFormat *format, vmpa2t *addr)
void g_executable_format_setup_portions(GExeFormat *format, GtkStatusStack *status)
{
- GBinFormat *base; /* Version basique du format */
vmpa2t addr; /* Emplacement vide de sens */
phys_t length; /* Taille de portion globale */
GExeFormatClass *class; /* Classe de l'instance */
size_t i; /* Boucle de parcours */
- base = G_BIN_FORMAT(format);
-
/**
* Avant de lire l'entête du format, on ne sait pas où on se trouve !
*/
init_vmpa(&addr, 0, VMPA_NO_VIRTUAL);
- length = g_binary_content_compute_size(base->content);
+ length = g_binary_content_compute_size(G_KNOWN_FORMAT(format)->content);
format->portions = g_binary_portion_new(BPC_RAW, &addr, length);
@@ -364,7 +361,6 @@ bool g_executable_format_complete_loading(GExeFormat *format, wgroup_id_t gid, G
size_t count; /* Qté d'infos supplémentaires */
size_t i; /* Boucle de parcours */
GDbgFormat *dbg; /* Informations de débogage */
- GBinFormat *base; /* Version basique du format */
result = true;
@@ -376,20 +372,12 @@ bool g_executable_format_complete_loading(GExeFormat *format, wgroup_id_t gid, G
{
dbg = g_exe_format_get_debug_info(format, i);
- result = g_binary_format_analyze(G_BIN_FORMAT(dbg), gid, status);
+ result = g_known_format_analyze(G_KNOWN_FORMAT(dbg), gid, status);
g_object_unref(G_OBJECT(dbg));
}
- if (result)
- {
- base = G_BIN_FORMAT(format);
-
- result = g_binary_format_complete_loading(base, status);
-
- }
-
return result;
}
@@ -445,7 +433,7 @@ void g_exe_format_include_portion(GExeFormat *format, GBinPortion *portion, cons
phys_t remaining; /* Taille maximale envisageable*/
bool truncated; /* Modification faite ? */
- available = g_binary_content_compute_size(G_BIN_FORMAT(format)->content);
+ available = g_binary_content_compute_size(G_KNOWN_FORMAT(format)->content);
range = g_binary_portion_get_range(portion);