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.c48
1 files changed, 5 insertions, 43 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c
index 5b80555..0875e1f 100644
--- a/src/format/symbol.c
+++ b/src/format/symbol.c
@@ -192,32 +192,29 @@ vmpa_t g_binary_symbol_get_address(const GBinSymbol *symbol)
/******************************************************************************
* *
* Paramètres : symbol = symbole à venir consulter. *
-* length = taille de l'instruction ou NULL. [OUT] *
* *
* Description : Fournit l'emplacement où se situe un symbole. *
* *
-* Retour : Adresse virtuelle ou physique associée. *
+* Retour : Zone mémoire couverte par le symbole. *
* *
* Remarques : - *
* *
******************************************************************************/
-const vmpa2t *g_binary_symbol_get_location(const GBinSymbol *symbol, off_t *length)
+const mrange_t *g_binary_symbol_get_range(const GBinSymbol *symbol)
{
- const vmpa2t *result; /* Localisation à retourner */
+ const mrange_t *result; /* Plage à retourner */
result = NULL;
switch (symbol->type)
{
case STP_DATA:
- result = g_arch_instruction_get_location2(symbol->extra.instr, length);
+ result = g_arch_instruction_get_range(symbol->extra.instr);
break;
case STP_ROUTINE:
- result = g_binary_routine_get_address(symbol->extra.routine);
- if (length != NULL)
- *length = g_binary_routine_get_size(symbol->extra.routine);
+ result = g_binary_routine_get_range(symbol->extra.routine);
break;
default:
@@ -234,41 +231,6 @@ const vmpa2t *g_binary_symbol_get_location(const GBinSymbol *symbol, off_t *leng
/******************************************************************************
* *
* Paramètres : symbol = symbole à venir consulter. *
-* *
-* Description : Fournit la taille officielle d'un symbole. *
-* *
-* Retour : Taille de symbole. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-off_t g_binary_symbol_get_size(const GBinSymbol *symbol)
-{
- off_t result; /* Taille à renvoyer */
-
- switch (symbol->type)
- {
- case STP_OBJECT:
- result = 1; /* FIXME */
- break;
- case STP_FUNCTION:
- /* FIXME */if (symbol->extra.routine == NULL) result = 1; else
- result = g_binary_routine_get_size(symbol->extra.routine);
- break;
- case STP_STRING:
- result = strlen(g_binary_symbol_to_string(symbol));
- break;
- }
-
- return result;;
-
-}
-
-
-/******************************************************************************
-* *
-* Paramètres : symbol = symbole à venir consulter. *
* alt = désignation humaine alternative à favoriser. *
* *
* Description : Définit un autre nom pour le symbole. *