void DumpScopeInfo( // DUMP INFORMATION FOR SCOPE SCOPE scope ) // - starting scope { DumpScope( scope ); RingWalk( ScopeFriends( scope ), &dumpFriend ); RingWalk( ScopeInherits( scope ), &dumpBaseClass ); }
void DumpScope( // DUMP SCOPE INFO FOR SYMBOL SCOPE scope ) // - scope { static char *scope_names[] = { #define SCOPE_DEF(a,b) # a SCOPE_DEFS #undef SCOPE_DEF }; char *id; print_delimit_line(); if( scope->id >= SCOPE_MAX ) { id = "***UNKNOWN***"; } else { id = scope_names[ scope->id ]; } printf( "SCOPE" F_BADDR " enclosing" F_PTR " names" F_PTR " owner" F_PTR F_NL " id" F_STRING " keep" F_HEX_2 " dtor_reqd" F_HEX_2 " dtor_naked" F_HEX_2 " try_catch" F_HEX_2 " in_unnamed" F_HEX_2 F_EOL , scope , scope->enclosing , scope->names , scope->owner.sym , id , scope->u.s.keep , scope->u.s.dtor_reqd , scope->u.s.dtor_naked , scope->u.s.try_catch , scope->u.s.in_unnamed ); switch( scope->id ) { case SCOPE_CLASS: { TYPE ctype; // class type ctype = ScopeClass( scope ); if( ctype != NULL ) { DumpClassInfo( ctype->u.c.info ); } } break; case SCOPE_FILE: dumpNameSpaceInfo( scope->owner.ns ); break; } ScopeWalkNames( scope, &dumpSymbolNameInfo ); RingWalk( ScopeFriends( scope ), &dumpFriendRef ); RingWalk( ScopeInherits( scope ), &dumpBaseClass ); }
static void dumpSymbolNameInfo( // DUMP SYMBOL_NAME ENTRY SYMBOL_NAME sn ) // - the entry { DumpSymbolName( sn ); DumpSymbol( sn->name_type ); RingWalk( sn->name_syms, &DumpSymbol ); }
static void dumpClassType( // DUMP EXTRA INFO FOR CLASS TYPE tp ) // - type { CLASSINFO *ci; // - class information ci = tp->u.c.info; DumpClassInfo( ci ); RingWalk( ci->bases, &dumpBaseClass ); }
void DwarfDefClass( class_entry *cl, unsigned_32 size ) /************************************************************/ // go through the list of dwarf segments, and make sure VM is allocated for // all of them. { size = size; // to avoid a warning if( (cl->flags & CLASS_DEBUG_INFO) != CLASS_DWARF ) return; DBIClass = cl; RingWalk( cl->segs, DefAClass ); }
static void FinishComdat( void *inf ) /***********************************/ { comdat_info *info = inf; if( info->flags & SYM_DEAD ) { // is redefined DoAltDef( info ); } else { StoreInfoData( info ); } RingWalk( info->pieces, FreeCDatPiece ); FreeCDatInfo( info ); }
void DumpHashStats( // DUMP ALL SCOPES' HASH TAB STATS void ) { RingWalk( scopes, (void(*)(void*))dump_hash ); }
void DumpScopes( // DUMP ALL SCOPES void ) { RingWalk( scopes, dump_scope_defn ); }
void ResolveComdats( void ) /********************************/ { RingWalk( CDatList, FinishComdat ); CDatList = NULL; }