diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-05-14 21:27:28 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-05-14 21:27:28 (GMT) |
commit | 1996274a43883aa58e8c565f7698bc7c338a9ce0 (patch) | |
tree | f9237e0ec4799da491c2ad411891f2b0a1cc9ee4 /src/format/format.c | |
parent | 83a9ca90e691614dd99d06b8391de216fc8ce727 (diff) |
Stopped to memorize the routines as a subset of symbols.
Diffstat (limited to 'src/format/format.c')
-rw-r--r-- | src/format/format.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/format/format.c b/src/format/format.c index d5cbda4..4dc6416 100644 --- a/src/format/format.c +++ b/src/format/format.c @@ -370,23 +370,6 @@ bool g_binary_format_add_symbol(GBinFormat *format, GBinSymbol *symbol) result = true; - switch (g_binary_symbol_get_target_type(symbol)) - { - case STP_ROUTINE: - case STP_ENTRY_POINT: - - routine = g_binary_symbol_get_routine(symbol); - - format->routines = qinsert(format->routines, &format->routines_count, - sizeof(GBinRoutine *), (__compar_fn_t)g_binary_routine_compare, - &routine); - break; - - default: - break; - - } - } else g_object_unref(G_OBJECT(symbol)); @@ -424,33 +407,6 @@ static void _g_binary_format_remove_symbol(GBinFormat *format, size_t index) symbol = format->symbols[index]; - switch (g_binary_symbol_get_target_type(symbol)) - { - case STP_ROUTINE: - case STP_ENTRY_POINT: - - routine = g_binary_symbol_get_routine(symbol); - - for (i = 0; i < format->routines_count; i++) - if (format->routines[i] == routine) - break; - - assert(i < format->routines_count); - - if ((i + 1) < format->routines_count) - memmove(&format->routines[i], &format->routines[i + 1], - (format->routines_count - i - 1) * sizeof(GBinRoutine *)); - - format->routines = (GBinRoutine **)realloc(format->routines, - --format->routines_count * sizeof(GBinRoutine *)); - - break; - - default: - break; - - } - assert(index < format->symbols_count); if ((index + 1) < format->symbols_count) @@ -938,28 +894,6 @@ bool g_binary_format_resolve_symbol(GBinFormat *format, const vmpa2t *addr, bool /****************************************************************************** * * * Paramètres : format = informations chargées à consulter. * -* count = taille du tableau créé. [OUT] * -* * -* Description : Fournit le prototype de toutes les routines détectées. * -* * -* Retour : Tableau créé ou NULL si aucun symbole de routine trouvé. * -* * -* Remarques : - * -* * -******************************************************************************/ - -GBinRoutine **g_binary_format_get_routines(const GBinFormat *format, size_t *count) -{ - *count = format->routines_count; - - return format->routines; - -} - - -/****************************************************************************** -* * -* Paramètres : format = informations chargées à consulter. * * count = taille de la liste retournée. [OUT] * * defsrc = fichier de code principal. [OUT] * * * |