diff options
Diffstat (limited to 'src/format/format.c')
-rw-r--r-- | src/format/format.c | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/format/format.c b/src/format/format.c index 439bd3e..5ff08e6 100644 --- a/src/format/format.c +++ b/src/format/format.c @@ -477,6 +477,77 @@ void g_binary_format_complete_analysis(GBinFormat *format, wgroup_id_t gid, GtkS /* ---------------------------------------------------------------------------------- */ +/* DECODAGE DE SYMBOLES */ +/* ---------------------------------------------------------------------------------- */ + + +/****************************************************************************** +* * +* 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. * +* * +* Retour : Instance obtenue ou NULL en cas d'échec. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GDataType *g_binary_format_decode_type(const GBinFormat *format, const char *desc) +{ + GDataType *result; /* Construction à remonter */ + GCompDemangler *demangler; /* Accès plus lisible */ + + demangler = G_BIN_FORMAT(format)->demangler; + + if (demangler != NULL) + result = g_compiler_demangler_decode_type(demangler, desc); + else + result = NULL; + + 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 routine. * +* * +* Retour : Instance obtenue ou NULL en cas d'échec. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GBinRoutine *g_binary_format_decode_routine(const GBinFormat *format, const char *desc) +{ + GBinRoutine *result; /* Construction à remonter */ + GCompDemangler *demangler; /* Accès plus lisible */ + + demangler = G_BIN_FORMAT(format)->demangler; + + if (demangler != NULL) + result = g_compiler_demangler_decode_routine(demangler, desc); + else + result = NULL; + + if (result == NULL) + { + result = g_binary_routine_new(); + g_binary_routine_set_name(result, strdup(desc)); + } + + return result; + +} + + +/* ---------------------------------------------------------------------------------- */ /* RASSEMBLEMENT ET GESTION DE SYMBOLES */ /* ---------------------------------------------------------------------------------- */ |