summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-17 23:06:19 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-17 23:06:19 (GMT)
commitf225f8af4eff40b5096f512b699571554e54f097 (patch)
tree8f0ec45beab6434dc77cb32151242f6eeacb2bea /src/format
parent7efc82d0b78389638fd1b9fac7203f8aad13b53c (diff)
Got the namespace separator from formats when listing symbols.
Diffstat (limited to 'src/format')
-rw-r--r--src/format/format.c30
-rw-r--r--src/format/format.h13
2 files changed, 41 insertions, 2 deletions
diff --git a/src/format/format.c b/src/format/format.c
index 2101767..449f0f0 100644
--- a/src/format/format.c
+++ b/src/format/format.c
@@ -488,6 +488,32 @@ void g_binary_format_complete_analysis(GBinFormat *format, wgroup_id_t gid, GtkS
/******************************************************************************
* *
* Paramètres : format = format binaire à consulter pour l'opération. *
+* *
+* Description : Fournit le décodeur de symboles privilégié pour un format. *
+* *
+* Retour : Décodeur préféré ou NULL s'il n'est pas renseigné. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GCompDemangler *g_binary_format_get_demangler(const GBinFormat *format)
+{
+ GCompDemangler *result; /* Décodeur à retourner */
+
+ result = format->demangler;
+
+ if (result != NULL)
+ g_object_ref(G_OBJECT(result));
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : format = format binaire à consulter pour l'opération. *
* desc = chaîne de caractères à décoder. *
* *
* Description : Décode une chaîne de caractères donnée en type. *
@@ -503,7 +529,7 @@ GDataType *g_binary_format_decode_type(const GBinFormat *format, const char *des
GDataType *result; /* Construction à remonter */
GCompDemangler *demangler; /* Accès plus lisible */
- demangler = G_BIN_FORMAT(format)->demangler;
+ demangler = format->demangler;
if (demangler != NULL)
result = g_compiler_demangler_decode_type(demangler, desc);
@@ -533,7 +559,7 @@ GBinRoutine *g_binary_format_decode_routine(const GBinFormat *format, const char
GBinRoutine *result; /* Construction à remonter */
GCompDemangler *demangler; /* Accès plus lisible */
- demangler = G_BIN_FORMAT(format)->demangler;
+ demangler = format->demangler;
if (demangler != NULL)
result = g_compiler_demangler_decode_routine(demangler, desc);
diff --git a/src/format/format.h b/src/format/format.h
index e552f0c..372b3b0 100644
--- a/src/format/format.h
+++ b/src/format/format.h
@@ -37,6 +37,11 @@
+/* Depuis ../mangling/demangler.h : Décodeur de désignations générique (instance) */
+typedef struct _GCompDemangler GCompDemangler;
+
+
+
#define G_TYPE_BIN_FORMAT g_binary_format_get_type()
#define G_BIN_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_binary_format_get_type(), GBinFormat))
#define G_IS_BIN_FORMAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_binary_format_get_type()))
@@ -84,6 +89,14 @@ void g_binary_format_complete_analysis(GBinFormat *, wgroup_id_t, GtkStatusStack
+/* ------------------------------ DECODAGE DE SYMBOLES ------------------------------ */
+
+
+/* Fournit le décodeur de symboles privilégié pour un format. */
+GCompDemangler *g_binary_format_get_demangler(const GBinFormat *);
+
+
+
/* ---------------------- RASSEMBLEMENT ET GESTION DE SYMBOLES ---------------------- */