summaryrefslogtreecommitdiff
path: root/src/analysis/routine.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2010-06-06 14:08:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2010-06-06 14:08:21 (GMT)
commitb5934203c1cb287eb46b07e866b54d1de240b87b (patch)
tree283fad2a6d4517b84985331e5234095c71c8734b /src/analysis/routine.c
parente72eea33b9967d4169d2c8ffcb4a9e85c4c3ee8c (diff)
Used a treeview with icons to show all known symbols.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@165 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r--src/analysis/routine.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c
index c5bf056..8db366d 100644
--- a/src/analysis/routine.c
+++ b/src/analysis/routine.c
@@ -340,6 +340,25 @@ void g_binary_routine_set_namespace(GBinRoutine *routine, GOpenidaType *namespac
/******************************************************************************
* *
+* Paramètres : routine = routine à mettre à jour. *
+* *
+* Description : Fournit le groupe d'appartenance d'une routine donnée. *
+* *
+* Retour : éventuelle instance d'appartenance ou NULL. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GOpenidaType *g_binary_routine_get_namespace(const GBinRoutine *routine)
+{
+ return routine->namespace;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : routine = routine à mettre à jour. *
* name = désignation humainement lisible. *
* *
@@ -444,7 +463,9 @@ void g_binary_routine_set_return_type(GBinRoutine *routine, GOpenidaType *type)
g_object_unref(G_OBJECT(routine->ret_type));
routine->ret_type = type;
- g_object_ref(G_OBJECT(type));
+
+ if (type != NULL)
+ g_object_ref(G_OBJECT(type));
}
@@ -593,7 +614,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 *_g_binary_routine_to_string(const GBinRoutine *routine, Routine2StringOptions options)
{
char *result; /* Chaîne à renvoyer */
char *namespace; /* Groupe d'appartenance */
@@ -629,7 +650,7 @@ char *g_binary_routine_to_string(const GBinRoutine *routine)
/* Nom de la routine */
- if (routine->namespace != NULL)
+ if (options & RSO_NAMESPACE && routine->namespace != NULL)
{
namespace = g_openida_type_to_string(routine->namespace);
@@ -650,7 +671,7 @@ char *g_binary_routine_to_string(const GBinRoutine *routine)
{
if (i > 0) result = stradd(result, ", ");
- typestr = g_binary_variable_to_string(routine->args[i]);
+ typestr = g_binary_variable_to_string(routine->args[i], !(options & RSO_LONG_TYPE));
result = stradd(result, typestr);
free(typestr);