Example #1
0
static bool cgrfDumpNode(       // DUMP CALL GRAPH NODE
    CALLGRAPH *ctl,             // - call graph information
    CALLNODE *node )            // - node to dump
{
    SYMBOL func;
    VBUF vbuf;

    func = node->base.object;
    if( func == NULL ) {
        func = ModuleInitFuncSym();
    }
    printf( "\nNode[%p] depth(%d) refs(%d) addrs(%d) opcodes(%d) cflags(%d)\n"
            "         inline_fun(%d) inlineable(%d) oe(%d) cgfile(%p)\n"
            "         state_table(%d) rescan(%d) stab_gen(%d)\n"
            "         %s flags(%x)\n"
          , node
          , node->depth
          , node->refs
          , node->addrs
          , node->opcodes
          , node->cond_flags
          , node->inline_fun
          , node->inlineable
          , node->inlineable_oe
          , node->cgfile
          , node->state_table
          , node->rescan
          , node->stab_gen
          , DbgSymNameFull( node->base.object, &vbuf )
          , func->flag );
    CgrfWalkCalls( ctl, node, &cgrfDumpCall );
    VbufFree( &vbuf );
    return false;
}
Example #2
0
void *CgFrontModInitOpen(       // OPEN FOR MODULE-INITIALIZATION CODE GEN
    SCOPE *save_scope )         // - more info to save
{
    void *save;                 // - save value

    save = codeCGFILE;
    CgFrontSwitchFile( ModuleInitFuncSym() );
    *save_scope = ModuleInitResume();
    return( save );
}
Example #3
0
void CgFrontModInitFini(        // PROCESS MODULE-INIT. AFTER FRONT-END
    void )
{
    SYMBOL mod;                 // - symbol for module-initialization func.
    CGFILE *fp;                 // - file for module initialization

    mod = ModuleInitFuncSym();
    if( SymIsReferenced( mod ) && ErrCount == 0 ) {
        ModuleInitConnect();
    } else {
        mod->flag |= SF_REFERENCED;
        fp = CgioLocateFile( mod );
        CgioFreeFile( fp );
    }
}