diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-12-23 19:46:04 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-12-23 19:46:04 +0000 |
commit | e99776d82aca5ed5ee7bbe2ad2f5f6191017110b (patch) | |
tree | 3aafd904f591d11ee7e3e13ede0d71bc9505612d /libobjc/sendmsg.c | |
parent | bd29eba228a2d866aac76c013d0425b28e8f08e1 (diff) | |
download | gcc-e99776d82aca5ed5ee7bbe2ad2f5f6191017110b.zip gcc-e99776d82aca5ed5ee7bbe2ad2f5f6191017110b.tar.gz gcc-e99776d82aca5ed5ee7bbe2ad2f5f6191017110b.tar.bz2 |
In libobjc/: 2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com>
* init.c (create_tree_of_subclasses_inherited_from): Updated
DEBUG_PRINTF messages.
(__objc_tree_insert_class): Same.
(__objc_send_load_using_method_list): Same.
(__objc_send_load): Same.
(__objc_exec_class): Same. In particular, do not print the module
name since it is no longer used.
* sendmsg.c (__objc_send_initialize): Added DEBUG_PRINTFs for
tracking +initialize calls.
(__objc_update_dispatch_table_for_class): Added DEBUG_PRINTFs for
tracking updates of dispatch tables.
(__objc_install_dispatch_table_for_class): Same.
From-SVN: r168215
Diffstat (limited to 'libobjc/sendmsg.c')
-rw-r--r-- | libobjc/sendmsg.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c index 983dd78..0cb375d 100644 --- a/libobjc/sendmsg.c +++ b/libobjc/sendmsg.c @@ -23,6 +23,9 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ +/* Uncommented the following line to enable debug logging. Use this + only while debugging the runtime. */ +/* #define DEBUG 1 */ /* FIXME: This file has no business including tm.h. */ /* FIXME: This should be using libffi instead of __builtin_apply @@ -543,6 +546,7 @@ __objc_send_initialize (Class class) if (! CLS_ISINITIALIZED (class)) { + DEBUG_PRINTF ("+initialize: need to initialize class '%s'\n", class->name); CLS_SETINITIALIZED (class); CLS_SETINITIALIZED (class->class_pointer); @@ -579,7 +583,17 @@ __objc_send_initialize (Class class) method_list = method_list->method_next; } if (imp) - (*imp) ((id) class, op); + { + DEBUG_PRINTF (" begin of [%s +initialize]\n", class->name); + (*imp) ((id) class, op); + DEBUG_PRINTF (" end of [%s +initialize]\n", class->name); + } +#ifdef DEBUG + else + { + DEBUG_PRINTF (" class '%s' has no +initialize method\n", class->name); + } +#endif } } } @@ -621,6 +635,8 @@ __objc_install_dispatch_table_for_class (Class class) re-compute all class links. */ if (! CLS_ISRESOLV (class)) __objc_resolve_class_links (); + + DEBUG_PRINTF ("__objc_install_dispatch_table_for_class (%s)\n", class->name); super = class->super_class; @@ -650,6 +666,8 @@ __objc_update_dispatch_table_for_class (Class class) if (class->dtable == __objc_uninstalled_dtable) return; + DEBUG_PRINTF (" _objc_update_dispatch_table_for_class (%s)\n", class->name); + objc_mutex_lock (__objc_runtime_mutex); arr = class->dtable; |