Commit 5b9d7ebf by Greg Hartman

Make the debug messages more descriptive

Change-Id: I43f1675a1c6059cc86eaf84ac768242cfc80b88f Reviewed-on: https://swiftshader-review.googlesource.com/3652Tested-by: 's avatarGreg Hartman <ghartman@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent 069f9507
......@@ -57,8 +57,8 @@ void AndroidEnterDebugger();
} 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)
......
......@@ -78,11 +78,11 @@ namespace es
#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__
......
......@@ -54,7 +54,7 @@ void Trace(const char* format, ...);
#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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment