diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-07-04 12:39:01 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-07-04 12:39:01 (GMT) |
commit | ade3ee4fd3b78e96deb08210838643969f2f6699 (patch) | |
tree | 09003a6f4ac00c09560de9ea9a91c125a7b14f68 /src/analysis/disass/routines.c | |
parent | a0463dfa8fe232d01ea925668f393d7507fa787b (diff) |
Updated the API for building symbol labels.
Diffstat (limited to 'src/analysis/disass/routines.c')
-rw-r--r-- | src/analysis/disass/routines.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/analysis/disass/routines.c b/src/analysis/disass/routines.c index a0f756c..f04611f 100644 --- a/src/analysis/disass/routines.c +++ b/src/analysis/disass/routines.c @@ -24,6 +24,9 @@ #include "routines.h" +#include <malloc.h> + + #include "dragon.h" #include "limit.h" #include "loop.h" @@ -336,6 +339,7 @@ void g_routines_study_handle_blocks(GRoutinesStudy *study, GBinRoutine *routine, const mrange_t *range; /* Couverture d'une routine */ const vmpa2t *start; /* Adresse de départ */ const instr_coverage *coverage; /* Instructions couvertes */ + char *label; /* Etiquette du symbole */ VMPA_BUFFER(loc); /* Position de la routine */ dragon_knight *knight; /* Complexité de code posée */ GBlockList *blocks; /* Liste de blocs basiques */ @@ -358,10 +362,18 @@ void g_routines_study_handle_blocks(GRoutinesStudy *study, GBinRoutine *routine, */ if (coverage == NULL) { + label = g_binary_symbol_get_label(symbol); + vmpa2_to_string(start, MDS_UNDEFINED, loc, NULL); - log_variadic_message(LMT_BAD_BINARY, _("Skipped out of bound routine '%s' @ %s"), - g_binary_routine_get_name(routine), loc); + if (label == NULL) + log_variadic_message(LMT_BAD_BINARY, _("Skipped out of bound routine @ %s"), loc); + + else + { + log_variadic_message(LMT_BAD_BINARY, _("Skipped out of bound routine '%s' @ %s"), label, loc); + free(label); + } return; |