예제 #1
0
static void     BrkMenuItem( a_window *wnd, gui_ctl_id id, int row, int piece )
{
    brkp        *bp;

    piece=piece;
    if( row < 0 ) {
        bp = NULL;
    } else {
        bp = BrkGetBP( row );
    }
    switch( id ) {
    case MENU_INITIALIZE:
        if( bp != NULL ) {
            WndMenuEnableAll( wnd );
            WndMenuEnable( wnd, MENU_BREAK_ENABLE, !bp->status.b.active );
            WndMenuEnable( wnd, MENU_BREAK_DISABLE, bp->status.b.active );
            WndMenuEnable( wnd, MENU_BREAK_SOURCE, bp != NULL && IS_BP_EXECUTE( bp->th ) );
            WndMenuEnable( wnd, MENU_BREAK_ASSEMBLY, bp != NULL && IS_BP_EXECUTE( bp->th ) );
        } else {
            WndMenuGrayAll( wnd );
        }
        WndMenuEnable( wnd, MENU_BREAK_CREATE_NEW, true );
        break;
    case MENU_BREAK_ENABLE:
        ActPoint( bp, true );
        break;
    case MENU_BREAK_DISABLE:
        ActPoint( bp, false );
        break;
    case MENU_BREAK_CREATE_NEW:
        if( DlgBreak( NilAddr ) )
            WndScrollBottom( wnd );
        break;
    case MENU_BREAK_CLEAR:
        RemoveBreak( bp->loc.addr );
        break;
    case MENU_BREAK_MODIFY:
        DlgBreak( bp->loc.addr );
        break;
    case MENU_BREAK_SOURCE:
        WndSrcInspect( bp->loc.addr );
        break;
    case MENU_BREAK_ASSEMBLY:
        WndAsmInspect( bp->loc.addr );
        break;
    }
}
예제 #2
0
void BrkClearAll( void )
{
    while( BrkList != NULL ) {
        RemoveBreak( BrkList->loc.addr );
    }
}