예제 #1
0
static brkp *AddPoint( address loc, mad_type_handle th, bool unmapped )
{
    brkp                *bp;
    brkp                **owner;

    if( !IS_BP_EXECUTE( th ) && !BrkCheckWatchLimit( loc, th ) )
        return( NULL );
    _Alloc( bp, sizeof( brkp ) );
    InitMappableAddr( &bp->loc );
    bp->th = th;
    bp->mad = SysConfig.mad;
    NullStatus( bp );
    bp->status.b.active = true;
    bp->source_line = NULL;
    bp->image_name = NULL;
    bp->mod_name = NULL;
    bp->sym_name = NULL;
    bp->cue_diff = 0;
    bp->status.b.unmapped = unmapped;
    SetPointAddr( bp, loc );
    bp->cmds = NULL;
    bp->status.b.use_cmds = false;
    bp->index = FindNextBPIndex();

    bp->total_hits = 0;
    bp->countdown = 0;
    bp->initial_countdown = 0;
    bp->status.b.use_countdown = false;
    bp->condition = NULL;
    bp->status.b.use_condition = false;
    bp->error = NULL;
    owner = &BrkList;
    while( *owner != NULL ) {
        owner = &((*owner)->next);
    }
    bp->next = NULL;
    *owner = bp;
    DbgUpdate( UP_BREAK_CHANGE );
    return( bp );
}
예제 #2
0
int GetBPsCount( void )
{
    return( FindNextBPIndex() - 1 );
}