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.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/format/executable.c b/src/format/executable.c
index aae182a..5ff773c 100644
--- a/src/format/executable.c
+++ b/src/format/executable.c
@@ -84,6 +84,84 @@ static void g_executable_format_init(GExeFormat *format)
+/******************************************************************************
+* *
+* Paramètres : format = informations chargées à compléter. *
+* info = informations de débogage à lier. *
+* *
+* Description : Rajoute des informations de débogage à un exécutable. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_exe_format_add_debug_info(GExeFormat *format, GDbgFormat *info)
+{
+ /* Ajout dans la liste */
+
+ format->debugs = (GDbgFormat **)realloc(format->debugs,
+ ++format->debugs_count * sizeof(GDbgFormat *));
+
+ format->debugs[format->debugs_count - 1] = info;
+
+ /* Intégration des symboles */
+
+ /* TODO */
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : format = informations chargées à consulter. *
+* *
+* Description : Compte le nombre de formats de débogage liés à l'exécutable. *
+* *
+* Retour : Nombre de formats de débogage attachés. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+size_t g_exe_format_count_debug_info(const GExeFormat *format)
+{
+ return format->debugs_count;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : format = informations chargées à consulter. *
+* index = indice des informations à transmettre. *
+* *
+* Description : Fournit un format de débogage attaché à l'exécutable. *
+* *
+* Retour : Informations de débogage attachées. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GDbgFormat *g_exe_format_get_debug_info(const GExeFormat *format, size_t index)
+{
+ GDbgFormat *result; /* Format à retourner */
+
+ if (index >= format->debugs_count)
+ result = NULL;
+
+ else
+ {
+ result = format->debugs[index];
+ g_object_ref(G_OBJECT(result));
+ }
+
+ return result;
+
+}
+