summaryrefslogtreecommitdiff
path: root/src/format/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/symbol.c')
-rw-r--r--src/format/symbol.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c
index 48f3dbb..97ff114 100644
--- a/src/format/symbol.c
+++ b/src/format/symbol.c
@@ -226,6 +226,37 @@ int g_binary_symbol_cmp(const GBinSymbol **a, const GBinSymbol **b)
/******************************************************************************
* *
+* Paramètres : symbol = symbole à analyser. *
+* addr = localisation à venir comparer à celle du symbole. *
+* *
+* Description : Compare un symbole et une localisation. *
+* *
+* Retour : Bilan de la comparaison : -1, 0 ou 1 (-1 par défaut). *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+int g_binary_symbol_cmp_with_vmpa(const GBinSymbol *symbol, const vmpa2t *addr)
+{
+ int result; /* Bilan à retourner */
+ const mrange_t *range; /* Emplacement du symbole */
+
+ range = g_binary_symbol_get_range(symbol);
+
+ if (range == NULL)
+ result = 1;
+
+ else
+ result = cmp_mrange_with_vmpa(range, addr);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : symbol = symbole à venir consulter. *
* *
* Description : Fournit le type du symbole. *