summaryrefslogtreecommitdiff
path: root/src/analysis/routine.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r--src/analysis/routine.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c
index cfa7cd5..c5bf056 100644
--- a/src/analysis/routine.c
+++ b/src/analysis/routine.c
@@ -45,6 +45,7 @@ struct _GBinRoutine
GOpenidaType *ret_type; /* Type retourné */
+ GOpenidaType *namespace; /* Espace de noms / classe */
char *name; /* Désignation humaine */
GOpenidaType *full_name; /* Désignation très complète */
@@ -319,6 +320,26 @@ void g_binary_routine_set_type(GBinRoutine *routine, RoutineType type)
/******************************************************************************
* *
+* Paramètres : routine = routine à mettre à jour. *
+* namespace = instance d'appartenance. *
+* *
+* Description : Définit le groupe d'appartenance d'une routine donnée. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_binary_routine_set_namespace(GBinRoutine *routine, GOpenidaType *namespace)
+{
+ routine->namespace = namespace;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : routine = routine à mettre à jour. *
* name = désignation humainement lisible. *
* *
@@ -575,6 +596,7 @@ size_t g_binary_routine_get_var_index_from_offset(const GBinRoutine *routine, si
char *g_binary_routine_to_string(const GBinRoutine *routine)
{
char *result; /* Chaîne à renvoyer */
+ char *namespace; /* Groupe d'appartenance */
size_t i; /* Boucle de parcours */
char *typestr; /* Stockage de nom temporaire */
@@ -607,6 +629,17 @@ char *g_binary_routine_to_string(const GBinRoutine *routine)
/* Nom de la routine */
+ if (routine->namespace != NULL)
+ {
+ namespace = g_openida_type_to_string(routine->namespace);
+
+ result = stradd(result, namespace);
+ result = stradd(result, "::");
+
+ free(namespace);
+
+ }
+
result = stradd(result, g_binary_routine_get_name(routine));
/* Liste des arguments */