Show
Ignore:
Timestamp:
02/13/07 15:54:41 (2 years ago)
Author:
bart
Message:

* Added a function to dump an eaccelerator class entry in debug.c
* Changed include order in mm.c because of eaccelerator.h include in debug.h

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/debug.c

    r286 r288  
    251251                p = ht->arBuckets[i]; 
    252252                while (p != NULL) { 
    253                         fprintf(F_fp, "%s <==> 0x%lX\n", p->arKey, p->h); 
     253                        fprintf(F_fp, "\t%s <==> 0x%lX\n", p->arKey, p->h); 
    254254                        p = p->pNext; 
    255255                } 
    256256        } 
    257257 
    258         p = ht->pListTail; 
    259         while (p != NULL) { 
    260                 fprintf(F_fp, "%s <==> 0x%lX\n", p->arKey, p->h); 
    261                 p = p->pListLast; 
    262         } 
    263258        fflush(F_fp); 
    264259} 
    265260 
     261/* 
     262 *  Dump an eaccelerator class entry structure 
     263 */ 
     264void ea_debug_dump_ea_class_entry(ea_class_entry *ce) 
     265{ 
     266    fprintf(F_fp, "ea class entry: '%s' (len = %u)\n", ce->name, ce->name_length); 
     267    fprintf(F_fp, "\tparent: '%s'\n", ce->parent); 
     268    fprintf(F_fp, "\ttype: %d\n", ce->type); 
     269    fprintf(F_fp, "\tfunction_table: %u entries\n", ce->function_table.nNumOfElements); 
     270    fprintf(F_fp, "\tdefault_properties: %u entries\n", ce->default_properties.nNumOfElements); 
     271#ifdef ZEND_ENGINE_2 
     272    fprintf(F_fp, "\tproperties_info: %u entries\n", ce->properties_info.nNumOfElements); 
     273#  ifdef ZEND_ENGINE_2_1 
     274    fprintf(F_fp, "\tdefault_static_members: %u entries\n", ce->default_static_members.nNumOfElements); 
     275#  endif 
     276    fprintf(F_fp, "\tstatic_members: %u entries\n", ce->static_members->nNumOfElements); 
     277    fprintf(F_fp, "\tconstants_Table: %u entries\n", ce->constants_table.nNumOfElements); 
     278    fprintf(F_fp, "\tce_flags: %u\n", ce->ce_flags); 
     279    fprintf(F_fp, "\tnum_interfaces: %u\n", ce->num_interfaces); 
     280    fprintf(F_fp, "\tfilename: %s\n", ce->filename); 
     281    fprintf(F_fp, "\tline_start: %u\n", ce->line_start); 
     282    fprintf(F_fp, "\tline_end: %u\n", ce->line_end); 
     283#  ifdef INCLUDE_DOC_COMMENTS 
     284    fprintf(F_fp, "\tdoc_comment: %s\n", ce->doc_comment); 
     285    fprintf(F_fp, "\tdoc_comment_len: %u\n", ce->doc_comment_len); 
     286#  endif 
     287#endif 
     288    fflush(F_fp); 
     289} 
     290 
     291/* 
     292 *  Dump a zend class entry structure 
     293 */ 
     294void ea_debug_dump_zend_class_entry(zend_class_entry *ce) 
     295{ 
     296    fprintf(F_fp, "zend class entry: '%s' (len = %u)\n", ce->name, ce->name_length); 
     297    fprintf(F_fp, "\tparent: '%s'\n", ce->parent); 
     298    fprintf(F_fp, "\ttype: %d\n", ce->type); 
     299    fprintf(F_fp, "\tfunction_table: %u entries\n", ce->function_table.nNumOfElements); 
     300    fprintf(F_fp, "\tdefault_properties: %u entries\n", ce->default_properties.nNumOfElements); 
     301#ifdef ZEND_ENGINE_2 
     302    fprintf(F_fp, "\tproperties_info: %u entries\n", ce->properties_info.nNumOfElements); 
     303#  ifdef ZEND_ENGINE_2_1 
     304    fprintf(F_fp, "\tdefault_static_members: %u entries\n", ce->default_static_members.nNumOfElements); 
     305#  endif 
     306    fprintf(F_fp, "\tstatic_members: %u entries\n", ce->static_members->nNumOfElements); 
     307    fprintf(F_fp, "\tconstants_Table: %u entries\n", ce->constants_table.nNumOfElements); 
     308    fprintf(F_fp, "\tce_flags: %u\n", ce->ce_flags); 
     309    fprintf(F_fp, "\tnum_interfaces: %u\n", ce->num_interfaces); 
     310    fprintf(F_fp, "\tfilename: %s\n", ce->filename); 
     311    fprintf(F_fp, "\tline_start: %u\n", ce->line_start); 
     312    fprintf(F_fp, "\tline_end: %u\n", ce->line_end); 
     313#  ifdef INCLUDE_DOC_COMMENTS 
     314    fprintf(F_fp, "\tdoc_comment: %s\n", ce->doc_comment); 
     315    fprintf(F_fp, "\tdoc_comment_len: %u\n", ce->doc_comment_len); 
     316#  endif 
     317#endif 
     318    fflush(F_fp); 
     319} 
     320 
    266321#endif /* #ifdef HAVE_EACCELERATOR */