aboutsummaryrefslogtreecommitdiff
path: root/instrument-functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'instrument-functions.c')
-rw-r--r--instrument-functions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/instrument-functions.c b/instrument-functions.c
index aff33ccd..32349772 100644
--- a/instrument-functions.c
+++ b/instrument-functions.c
@@ -199,7 +199,8 @@ static void print_debug(void *this_fn, void *call_site, action_type action)
printf("%s", func);
printf(" (%d)", profile_func_level);
/* Print the "from" part except for the main function) */
- if (action == ENTER && strncmp(func, "main", sizeof("main"))) {
+ if (action == ENTER && func != NULL &&
+ strncmp(func, "main", sizeof("main"))) {
/* Calling function */
if ((bfd_vma)call_site < vma) {
printf("[ERROR address call_site]");