summaryrefslogtreecommitdiff
path: root/src/format/executable-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/executable-int.h')
-rw-r--r--src/format/executable-int.h54
1 files changed, 20 insertions, 34 deletions
diff --git a/src/format/executable-int.h b/src/format/executable-int.h
index 8722795..1ca1bdb 100644
--- a/src/format/executable-int.h
+++ b/src/format/executable-int.h
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* executable-int.h - prototypes de code utile aux formats d'exécutables
*
- * Copyright (C) 2009-2019 Cyrille Bagard
+ * Copyright (C) 2009-2024 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -28,79 +28,65 @@
#include "executable.h"
-#include "format-int.h"
+#include "program-int.h"
/* Indique le type d'architecture visée par le format. */
-typedef const char * (* get_target_machine_fc) (const GExeFormat *);
+typedef char * (* get_target_machine_fc) (const GExecutableFormat *);
/* Fournit l'adresse principale associée à un format. */
-typedef bool (* get_main_addr_fc) (GExeFormat *, vmpa2t *);
+typedef bool (* get_main_addr_fc) (GExecutableFormat *, vmpa2t *);
/* Etend la définition des portions au sein d'un binaire. */
-typedef void (* refine_portions_fc) (GExeFormat *);
+typedef bool (* refine_portions_fc) (GExecutableFormat *);
/* Fournit l'emplacement correspondant à une position physique. */
-typedef bool (* translate_phys_fc) (GExeFormat *, phys_t, vmpa2t *);
+typedef bool (* translate_phys_fc) (GExecutableFormat *, phys_t, vmpa2t *);
/* Fournit l'emplacement correspondant à une adresse virtuelle. */
-typedef bool (* translate_virt_fc) (GExeFormat *, virt_t, vmpa2t *);
-
-/* Fournit l'emplacement d'une section donnée. */
-typedef bool (* get_range_by_name_fc) (const GExeFormat *, const char *, mrange_t *);
-
+typedef bool (* translate_virt_fc) (GExecutableFormat *, virt_t, vmpa2t *);
/* Format d'exécutable générique (instance) */
-struct _GExeFormat
+struct _GExecutableFormat
{
- GBinFormat parent; /* A laisser en premier */
+ GProgramFormat parent; /* A laisser en premier */
- GDbgFormat **debugs; /* Informations de débogage */
- size_t debugs_count; /* Nombre de ces informations */
-
- GBinPortion **user_portions; /* Couches de morceaux binaires*/
- size_t user_count; /* Nombre de ces portions */
- GBinPortion *portions; /* Couches de morceaux binaires*/
- GMutex mutex; /* Accès à l'arborescence */
+ GBinaryPortion *portions; /* Couches de morceaux binaires*/
};
/* Format d'exécutable générique (classe) */
-struct _GExeFormatClass
+struct _GExecutableFormatClass
{
- GBinFormatClass parent; /* A laisser en premier */
+ GProgramFormatClass parent; /* A laisser en premier */
get_target_machine_fc get_machine; /* Architecture ciblée */
+
get_main_addr_fc get_main_addr; /* Obtention d'adresse première*/
refine_portions_fc refine_portions; /* Décrit les portions binaires*/
translate_phys_fc translate_phys; /* Correspondance phys -> vmpa */
translate_virt_fc translate_virt; /* Correspondance virt -> vmpa */
- get_range_by_name_fc get_range_by_name; /* Emplacement de sections */
-
};
-/* Crée les portions potentiellement utiles aux traductions. */
-void g_executable_format_setup_portions(GExeFormat *, GtkStatusStack *);
+/* Met en place un nouveau contenu binaire à analyser. */
+bool g_executable_format_create(GExecutableFormat *, GBinContent *);
-/* Effectue les ultimes opérations de chargement d'un binaire. */
-bool g_executable_format_complete_loading(GExeFormat *, wgroup_id_t, GtkStatusStack *);
+/* Fournit l'emplacement correspondant à une position physique. */
+bool g_executable_format_translate_offset_into_vmpa_without_virt(const GExecutableFormat *, phys_t, vmpa2t *);
/* Fournit l'emplacement correspondant à une position physique. */
-bool g_exe_format_without_virt_translate_offset_into_vmpa(const GExeFormat *, phys_t, vmpa2t *);
+bool g_executable_format_translate_offset_into_vmpa_with_portions(GExecutableFormat *, phys_t, vmpa2t *);
/* Fournit l'emplacement correspondant à une adresse virtuelle. */
-bool g_exe_format_without_virt_translate_address_into_vmpa(const GExeFormat *, virt_t, vmpa2t *);
-
-/* Fournit l'emplacement correspondant à une position physique. */
-bool g_exe_format_translate_offset_into_vmpa_using_portions(GExeFormat *, phys_t, vmpa2t *);
+bool g_executable_format_translate_address_into_vmpa_without_virt(const GExecutableFormat *, virt_t, vmpa2t *);
/* Fournit l'emplacement correspondant à une adresse virtuelle. */
-bool g_exe_format_translate_address_into_vmpa_using_portions(GExeFormat *, virt_t, vmpa2t *);
+bool g_executable_format_translate_address_into_vmpa_with_portions(GExecutableFormat *, virt_t, vmpa2t *);