bool ReportTrap( unsigned conditions, bool stack_cmds ) { bool cmds_pushed; char *p; if( conditions & COND_EXCEPTION ) { RecordMsgText( &conditions ); // get the 'access violation, etc' message p = StrCopy( LIT_ENG( Task_Exception ), TxtBuff ); if( MsgText != NULL ) StrCopy( MsgText, p ); MsgText = DbgRealloc( MsgText, strlen( TxtBuff ) + 1 ); StrCopy( TxtBuff, MsgText ); DUIMsgBox( MsgText ); } if( conditions & (COND_EXCEPTION|COND_TERMINATE) ) { RingBell(); } DisplayMsgText(); if( conditions & COND_USER ) { DUIInfoBox( LIT_ENG( User_Interupt ) ); PurgeInpStack(); RecordAsynchEvent(); } else if( conditions & COND_TERMINATE ) { DUIInfoBox( LIT_ENG( Task_Completed ) ); _SwitchOff( SW_HAVE_TASK ); } else if( conditions & COND_LIBRARIES ) { Format( TxtBuff, "%s '%s'", LIT_ENG( Break_on_DLL_Load ), GetLastImageName() ); DUIInfoBox( TxtBuff ); } else { DUIStatusText( LIT_ENG( Empty ) ); } cmds_pushed = DispBPMsg( stack_cmds ); DbgUpdate( UP_MEM_CHANGE | UP_CSIP_CHANGE | UP_REG_CHANGE | UP_CODE_EXECUTED | UP_THREAD_STATE ); return( cmds_pushed ); }
static void RecordBreakEvent( brkp *bp, brk_event event ) { GetBPCmd( bp, event, TxtBuff, TXT_LEN ); RecordEvent( TxtBuff ); if( event == B_SET && !IS_NIL_ADDR( bp->loc.addr ) ) { GetBPAddrText( bp, TxtBuff ); DUIStatusText( TxtBuff ); } }
void ReportTask( task_status task, error_idx code ) { switch( task ) { case TASK_NEW: _SwitchOn( SW_HAVE_TASK ); DUIStatusText( LIT_ENG( New_Task ) ); DUIDlgTxt( LIT_ENG( New_Task ) ); break; case TASK_NOT_LOADED: _SwitchOff( SW_HAVE_TASK ); Format( TxtBuff, LIT_ENG( Task_Not_Loaded ), code ); DUIMsgBox( TxtBuff ); RingBell(); RingBell(); break; case TASK_NONE: _SwitchOff( SW_HAVE_TASK ); DUIStatusText( LIT_ENG( No_Task ) ); DUIDlgTxt( LIT_ENG( No_Task ) ); break; } }