summaryrefslogtreecommitdiff
path: root/src/arch/vmpa.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-22 11:35:09 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-22 11:35:09 (GMT)
commitb639c1f4abca32152bf88f8fd47a9cd114da701b (patch)
tree3c10f78c94e2747f4c22d692d276ae24c1f6a44d /src/arch/vmpa.c
parentd450f573d94f795d83d09526546d63c81fde2e1d (diff)
Created a dialog box to select an entry point to display.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@476 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/vmpa.c')
-rw-r--r--src/arch/vmpa.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c
index c479319..67be9a9 100644
--- a/src/arch/vmpa.c
+++ b/src/arch/vmpa.c
@@ -641,6 +641,47 @@ bool prepare_vmpa_db_statement(const vmpa2t *addr, bool create, bound_value **va
/* ---------------------------------------------------------------------------------- */
+/* AIDES FONCTIONNELLES AUXILIAIRES */
+/* ---------------------------------------------------------------------------------- */
+
+
+/******************************************************************************
+* *
+* Paramètres : label = désignation humaine d'unn symbole de base. *
+* offset = décalage déterminé à faie apparaître au besoin. *
+* *
+* Description : Construit une désignation de symbole avec décalage. *
+* *
+* Retour : Chaîne de caractères constituée à libérer après usage. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+char *make_symbol_offset(const char *label, phys_t offset)
+{
+ char *result; /* Construction à retourner */
+ size_t length; /* Taille de désignation créée */
+
+ if (offset == 0)
+ result = strdup(label);
+
+ else
+ {
+ length = strlen(label) + 1 + VMPA_MAX_LEN + 1;
+ result = (char *)calloc(length, sizeof(char));
+
+ snprintf(result, length, "%s+0x%llx", label, (unsigned long long)offset);
+
+ }
+
+ return result;
+
+}
+
+
+
+/* ---------------------------------------------------------------------------------- */
/* DEFINITION D'UNE ZONE EN MEMOIRE */
/* ---------------------------------------------------------------------------------- */