summaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-12-21 14:56:18 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-12-21 14:56:18 +0000
commitdf0820da970383d46a7e5fb0a04d504a8b280553 (patch)
tree0a007b1061e13c1efe9e683b79763a5652183aaa /libobjc
parent59db109afd1513b2fa26ef4adcf85ba80d5eab59 (diff)
downloadgcc-df0820da970383d46a7e5fb0a04d504a8b280553.tar.gz
In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com> * objc-private/common.h: When DEBUG is defined, include <stdio.h>. Updated comments. * init.c (__objc_tree_insert_class): Use %p, not %x, when printing a pointer using DEBUG_PRINTF. From-SVN: r168119
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog7
-rw-r--r--libobjc/init.c2
-rw-r--r--libobjc/objc-private/common.h7
3 files changed, 15 insertions, 1 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 83387eef679..56bfe2e9afb 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,5 +1,12 @@
2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
+ * objc-private/common.h: When DEBUG is defined, include <stdio.h>.
+ Updated comments.
+ * init.c (__objc_tree_insert_class): Use %p, not %x, when printing
+ a pointer using DEBUG_PRINTF.
+
+2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
+
PR libobjc/45953
* selector.c (__sel_register_typed_name): When registering a new
selector with the same name as an existing one, reuse the existing
diff --git a/libobjc/init.c b/libobjc/init.c
index 0e0d372adad..3c64f5bb7ed 100644
--- a/libobjc/init.c
+++ b/libobjc/init.c
@@ -209,7 +209,7 @@ create_tree_of_subclasses_inherited_from (Class bottom_class, Class upper)
static objc_class_tree *
__objc_tree_insert_class (objc_class_tree *tree, Class class)
{
- DEBUG_PRINTF ("__objc_tree_insert_class: tree = %x, class = %s\n",
+ DEBUG_PRINTF ("__objc_tree_insert_class: tree = %p, class = %s\n",
tree, class->name);
if (tree == NULL)
diff --git a/libobjc/objc-private/common.h b/libobjc/objc-private/common.h
index cbb335b8f83..4f4ec5cd077 100644
--- a/libobjc/objc-private/common.h
+++ b/libobjc/objc-private/common.h
@@ -33,7 +33,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
being included by an external file. */
#define GNU_LIBOBJC_COMPILING_LIBOBJC_ITSELF 1
+/* When debugging libobjc, add
+
+ #define DEBUG 1
+
+ at the very beginning of a file in libobjc (before including this file) to turn
+ on DEBUG_PRINTF(). */
#ifdef DEBUG
+#include <stdio.h>
#define DEBUG_PRINTF(format, args...) printf (format, ## args)
#else
#define DEBUG_PRINTF(format, args...)