diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-05-13 12:32:03 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-05-13 12:32:03 (GMT) |
commit | 118a668adbf6ca9d4c549618e54f58330f46ce58 (patch) | |
tree | 10e75f1a7e83ab48aba82a5a595441a065a6037e /src/analysis/routine.c | |
parent | e56b4db3aae87f0458319019635dea4968a5c529 (diff) |
Supported Dalvik VM / DEX (partially).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@155 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r-- | src/analysis/routine.c | 33 |
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 */ |