summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-11-13 10:23:11 +0000
committerJosé Fonseca <jfonseca@vmware.com>2012-11-15 17:38:03 +0000
commit35e28b4583fdb206dc6b2dd49412362dc6a51953 (patch)
tree8e75438fc8f438f448d5d5cfb4aa8e3a7f2c0f7b
parent94f9ea03a12fe1adf90c0e5defb0063cd568b537 (diff)
util/u_debug: Fix DEBUG_NAMED_VALUE.
"#__symbol" doesn't work with nested macro expansions, at least not on gcc.
-rw-r--r--src/gallium/auxiliary/util/u_debug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 14d319c2cf..3b42c2f07f 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -275,7 +275,7 @@ struct debug_named_value
* ...
* @endcode
*/
-#define DEBUG_NAMED_VALUE(__symbol) DEBUG_NAMED_VALUE_WITH_DESCRIPTION(__symbol, NULL)
+#define DEBUG_NAMED_VALUE(__symbol) {#__symbol, (unsigned long)__symbol, NULL}
#define DEBUG_NAMED_VALUE_WITH_DESCRIPTION(__symbol, __desc) {#__symbol, (unsigned long)__symbol, __desc}
#define DEBUG_NAMED_VALUE_END {NULL, 0, NULL}