Make the debug messages more descriptive Change-Id: I43f1675a1c6059cc86eaf84ac768242cfc80b88f Reviewed-on: https://swiftshader-review.googlesource.com/3652 Tested-by: Greg Hartman <ghartman@google.com> Reviewed-by: Nicolas Capens <capn@google.com> Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/Common/DebugAndroid.hpp b/src/Common/DebugAndroid.hpp index 41dd3ba..504401e 100644 --- a/src/Common/DebugAndroid.hpp +++ b/src/Common/DebugAndroid.hpp
@@ -57,8 +57,8 @@ } while(0) #define UNREACHABLE(value) do { \ - ALOGE("badness: unreachable case reached: %s %s:%d. value: %d", \ - __FUNCTION__, __FILE__, __LINE__, value); \ + ALOGE("badness: unreachable case reached: %s %s:%d. %s: %d", \ + __FUNCTION__, __FILE__, __LINE__, #value, value); \ AndroidEnterDebugger(); \ } while(0)
diff --git a/src/OpenGL/common/debug.h b/src/OpenGL/common/debug.h index 5035399..e6ee160 100644 --- a/src/OpenGL/common/debug.h +++ b/src/OpenGL/common/debug.h
@@ -78,11 +78,11 @@ #undef UNREACHABLE #if !defined(NDEBUG) #define UNREACHABLE(value) do { \ - ERR("\t! Unreachable case reached: %s(%d). Value: %d\n", __FUNCTION__, __LINE__, value); \ + ERR("\t! Unreachable case reached: %s(%d). %s: %d\n", __FUNCTION__, __LINE__, #value, value); \ assert(false); \ } while(0) #else - #define UNREACHABLE(value) ERR("\t! Unreachable reached: %s(%d). Value: %d\n", __FUNCTION__, __LINE__, value) + #define UNREACHABLE(value) ERR("\t! Unreachable reached: %s(%d). %s: %d\n", __FUNCTION__, __LINE__, #value, value) #endif #endif // __ANDROID__
diff --git a/src/OpenGL/compiler/debug.h b/src/OpenGL/compiler/debug.h index c0c8152..1b4a69b 100644 --- a/src/OpenGL/compiler/debug.h +++ b/src/OpenGL/compiler/debug.h
@@ -54,7 +54,7 @@ #undef UNREACHABLE #define UNREACHABLE(value) do { \ - Trace("Unreachable reached: %s(%d). Value: %d\n", __FUNCTION__, __LINE__, value); \ + Trace("Unreachable reached: %s(%d). %s: %d\n", __FUNCTION__, __LINE__, #value, value); \ assert(false); \ } while(0)