diff --git a/datashadow/datashadow_callbacks.c b/datashadow/datashadow_callbacks.c index d745c737eb7b782a41915238b557be24acabba25..c0aeed9cf741630b408479e69c25e78999d312d0 100644 --- a/datashadow/datashadow_callbacks.c +++ b/datashadow/datashadow_callbacks.c @@ -66,8 +66,9 @@ void fptr_shadow_check_64(int p_shadowIndex, int p_policy, void **p_shadow) switch (p_policy) { case SHADOW_CONTINUE: #ifdef DEBUG - my_strcpy(msg, "Warning: overwrite of function pointer detected -- restoring saved value: 0x"); + my_strcpy(msg, "Warning: overwrite of function pointer detected -- restoring saved value: shadow: 0x"); itox(*p_shadow, &msg[strlen(msg)]); + my_strcpy(&msg[strlen(msg)], " \n"); write(2, msg, strlen(msg)); #endif @@ -76,7 +77,11 @@ void fptr_shadow_check_64(int p_shadowIndex, int p_policy, void **p_shadow) default: { char msg[MAX_DIAGNOSTIC_SIZE]; - my_strcpy(msg, "Warning: overwrite of function pointer detected -- induce segfault\n"); + my_strcpy(msg, "shadow value: 0x"); + itox(*p_shadow, &msg[strlen(msg)]); + my_strcpy(&msg[strlen(msg)], " shadow idx: 0x"); + itox(p_shadowIndex, &msg[strlen(msg)]); + my_strcpy(&msg[strlen(msg)], " : Warning: overwrite of function pointer or critical detected -- induce segfault\n"); write(2, msg, strlen(msg)); my_strcpy(0,""); // induce crash }