Пример #1
0
extern void DwarfFini( dw_client  client )
/****************************************/
{
    int     i;
    int     status;
    char    *out_fname;
    FILE    *out_file;

    if( !CompFlags.emit_browser_info ) return;

    DWEndCompileUnit( client );
    DWFini( client );

    // close after writing
    for( i = 0 ; i < DW_DEBUG_MAX ; i++ ) {
        DwioCloseOutputFile( dw_sections[i].file );
    }

    out_fname = IoSuppOutFileName( OFT_MBR );
    out_file = SrcFileFOpen( out_fname, SFO_WRITE_BINARY );
    if( out_file == NULL ) {
        puts( strerror( errno ) );
        puts( out_fname );
        CFatal( "dwarf: unable to open file for writing" );
    }

    // concatenate files
    if( createBrowseFile( out_file,
                          &dw_sections[DW_DEBUG_ABBREV],
                          &dw_sections[DW_DEBUG_INFO],
                          &dw_sections[DW_DEBUG_REF],
                          &dw_sections[DW_DEBUG_LINE],
                          &dw_sections[DW_DEBUG_MACINFO] ) ) {
        puts( strerror( errno ) );
        CFatal( "dwarf: error in merging browse files" );
    }

    status = SrcFileFClose( out_file );
    if( status ) {
        puts( strerror( errno ) );
        puts( out_fname );
        CFatal( "dwarf: unable to close file" );
    }

    // delete
    for( i = 0 ; i < DW_DEBUG_MAX ; i++ ) {
        DwioFreeFile( dw_sections[i].file );
    }
    DwioFini();
}
Пример #2
0
void DwarfFini( dw_client client )
/********************************/
{
    FILE    *out_file;

    DWEndCompileUnit( client );
    DWFini( client );

    out_file = OpenBrowseFile();
    if( out_file != NULL ) {
        // concatenate files
        createBrowseFile( out_file );
        fclose( out_file );
    }
}
Пример #3
0
void DwarfFini( dw_client client )
/********************/
{
    FILE    *out_file;

    DWEndCompileUnit( client );
    DWFini( client );

    out_file = OpenBrowseFile();
    if( out_file != NULL ) {

        // concatenate files
        createBrowseFile( out_file,
                          &DWSections[DW_DEBUG_ABBREV],
                          &DWSections[DW_DEBUG_INFO],
                          &DWSections[DW_DEBUG_REF],
                          &DWSections[DW_DEBUG_LINE],
                          &DWSections[DW_DEBUG_MACINFO] );
        fclose( out_file );
    }
}