示例#1
0
void    CVRtnEnd( dbg_rtn *rtn, offset lc )
/*****************************************/
{
    cv_out              out[1];
    fsize               proc_length;
    fsize               debug_end;
    dbg_patch           *dpatch;
    long_offset         here;
    segment_id          old_segid;

    dpatch = RtnPatch;
    old_segid = SetOP( dpatch->segid );
    here = AskBigLocation();
    SetBigLocation( dpatch->offset + offsetof( s_gproc, f.proc_length ) );
    proc_length = lc - rtn->rtn_blk->start;
    DataBytes( sizeof( proc_length ), &proc_length );
    SetBigLocation( dpatch->offset + offsetof( s_gproc, f.debug_end ) );
    debug_end = rtn->epi_start - rtn->rtn_blk->start;
    DataBytes( sizeof( debug_end ), &debug_end );
    SetBigLocation( here );
    SetOP( old_segid );
    NewBuff( out, CVSyms );
    StartSym(  out, SG_END );
    EndSym( out );
    buffEnd( out );
}
示例#2
0
static void CLISeek( dw_sectnum sect, long offs, uint type )
/**********************************************************/
{
    sect_info           *curr;
    long_offset         from;
    segment_id          old;

    from = 0;
    curr = &DwarfSegs[sect];
    old = SetOP( curr->seg );
    switch( type ) {
    case DW_SEEK_CUR:
        from = AskBigLocation();
        break;
    case DW_SEEK_SET:
        from = 0;
        break;
    case DW_SEEK_END:
        from = AskBigMaxSize();
        break;
    }
    offs += from;
    SetBigLocation( offs );
    SetOP( old );
}
示例#3
0
void    CVBlkEnd( dbg_block *blk, offset lc )
/*******************************************/
{
    fsize               length;
    long_offset         here;
    segment_id          old_segid;
    dbg_patch           *dpatch;
    cv_out              out[1];

    dpatch = &blk->patches->patch;
    old_segid = SetOP( dpatch->segid );
    here = AskBigLocation();
    SetBigLocation( dpatch->offset + offsetof( s_block, f.length ) );
    length = lc - blk->start;
    DataBytes( sizeof( length ), &length );
    SetBigLocation( here );
    SetOP( old_segid );
    NewBuff( out, CVSyms );
    StartSym(  out, SG_END );
    EndSym( out );
    buffEnd( out );
    CGFree( blk->patches );
}