summaryrefslogtreecommitdiff
path: root/src/analysis/disass/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/disass/fetch.c')
-rw-r--r--src/analysis/disass/fetch.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/src/analysis/disass/fetch.c b/src/analysis/disass/fetch.c
index 9ebe231..67a6f3b 100644
--- a/src/analysis/disass/fetch.c
+++ b/src/analysis/disass/fetch.c
@@ -35,7 +35,7 @@
/* Suit un flot d'exécution pour désassembler du code. */
-static void follow_execution_flow(const GLoadedBinary *, GProcContext *, mem_area **, size_t *, status_blob_info *, virt_t);
+static void follow_execution_flow(const GLoadedBinary *, GProcContext *, mem_area **, size_t *, status_blob_info *);
/* S'assure que l'ensemble des aires est entièrement décodé. */
static void ensure_all_mem_areas_are_filled(mem_area **, size_t *, const GLoadedBinary *, GProcContext *, status_blob_info *);
@@ -50,7 +50,6 @@ static void ensure_all_mem_areas_are_filled(mem_area **, size_t *, const GLoaded
* areas = liste de zones contenant des données à traiter. *
* count = nombre de ces aires à disposition. *
* info = informations liées à l'affichage de la progression. *
-* virt = adresse d'un point de départ d'un traitement. *
* *
* Description : Suit un flot d'exécution pour désassembler du code. *
* *
@@ -60,17 +59,13 @@ static void ensure_all_mem_areas_are_filled(mem_area **, size_t *, const GLoaded
* *
******************************************************************************/
-static void follow_execution_flow(const GLoadedBinary *binary, GProcContext *ctx, mem_area **areas, size_t *count, status_blob_info *info, virt_t virt)
+static void follow_execution_flow(const GLoadedBinary *binary, GProcContext *ctx, mem_area **areas, size_t *count, status_blob_info *info)
{
+ virt_t virt; /* Adresse de départ dépilée */
vmpa2t addr; /* Conversion en pleine adresse*/
GExeFormat *format; /* Format du fichier binaire */
size_t index; /* Zone trouvée à traiter */
- printf("-- follow 0x%08x\n", (unsigned int)virt);
-
- if (virt == VMPA_NO_VIRTUAL)
- g_proc_context_push_drop_point(ctx, virt);
-
while (g_proc_context_has_drop_points(ctx))
{
virt = g_proc_context_pop_drop_point(ctx);
@@ -153,12 +148,6 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt
mem_area *areas; /* Zone de productions */
size_t count; /* Nombre de ces zones */
status_blob_info *info; /* Informations de progression */
- virt_t virt; /* Point d'accroche virtuelle */
- GBinSymbol **symbols; /* Symboles à représenter */
- size_t sym_count; /* Qté de symboles présents */
- size_t i; /* Boucle de parcours */
- const mrange_t *range; /* Couverture d'un symbole */
- const vmpa2t *addr; /* Point de départ du symbole */
double done; /* Portion de travail accompli */
format = G_BIN_FORMAT(g_loaded_binary_get_format(binary));
@@ -182,28 +171,7 @@ GArchInstruction *disassemble_binary_content(const GLoadedBinary *binary, GtkExt
_("Disassembling following the execution flow..."),
0, length);
- /* Insertion des points de départ */
-
- follow_execution_flow(binary, ctx, &areas, &count, info, VMPA_NO_VIRTUAL);
-
- /* Symboles exécutables présents et passés à travers les mailles */
-
- symbols = g_binary_format_get_symbols(format, &sym_count);
-
- for (i = 0; i < sym_count; i++)
- {
- if (g_binary_symbol_get_target_type(symbols[i]) != STP_FUNCTION)
- continue;
-
- range = g_binary_symbol_get_range(symbols[i]);
- addr = get_mrange_addr(range);
- virt = get_virt_addr(addr);
-
- follow_execution_flow(binary, ctx, &areas, &count, info, virt);
-
- }
-
- printf(" ------------------------------------------- follow done\n");
+ follow_execution_flow(binary, ctx, &areas, &count, info);
done = get_current_progessive_status(info);