diff options
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; |