bool DispBPMsg( bool stack_cmds ) { brkp *bp; brkp *next; char *p; bool ret; cmd_list *cmds; ret = false; for( bp = BrkList; bp != NULL; bp = bp->next ) { if( !bp->status.b.hit ) continue; if( !bp->status.b.silent ) { p = GetBPAddrText( bp, TxtBuff ); if( !IS_BP_EXECUTE( bp->th ) ) { p = StrCopy( " - ", p ); p = StrVal( LIT_ENG( OldVal ), bp, p ); GetWPVal( bp ); p = StrVal( LIT_ENG( NewVal ), bp, p ); *p = NULLCHAR; } DUIInfoBox( TxtBuff ); } if( stack_cmds && bp->status.b.resume ) { cmds = AllocCmdList( "go/keep", sizeof( "go/keep" ) ); PushCmdList( cmds ); TypeInpStack( INP_HOOK ); FreeCmdList( cmds ); ret = true; } if( stack_cmds && ( bp->cmds != NULL ) && bp->status.b.use_cmds ) { bp->status.b.cmds_pushed = true; PushCmdList( bp->cmds ); TypeInpStack( INP_BREAK_POINT ); ret = true; } } for( bp = BrkList; bp != NULL; bp = next ) { next = bp->next; if( bp->status.b.autodestruct ) { DUIRemoveBreak( bp ); } } if( UserTmpBrk.status.b.hit ) { p = Format( TxtBuff, LIT_ENG( Break_on_execute ) ); Format( p, BrkFmt(), UserTmpBrk.loc.addr ); DUIDlgTxt( TxtBuff ); } return( ret ); }
static char *GetBPAddrText( brkp *bp, char *p ) { if( IS_BP_EXECUTE( bp->th ) ) { p = Format( p, LIT_ENG( Break_on_execute ) ); p = Format( p, BrkFmt(), bp->loc.addr ); } else { p = StrCopy( LIT_ENG( Break_on_write ), p ); if( bp->source_line != NULL ) { p = StrCopy( bp->source_line, p ); } else { p = Format( p, "%a", bp->loc.addr ); } } return( p ); }
static char *GetBPAddrText( brkp *bp, char *p ) { if( bp->th != MAD_NIL_TYPE_HANDLE ) { p = StrCopy( LIT( Break_on_write ), p ); if( bp->source_line != NULL ) { p = StrCopy( bp->source_line, p ); } else { p = Format( p, "%a", bp->loc.addr ); } } else { p = Format( p, LIT( Break_on_execute ) ); p = Format( p, BrkFmt(), bp->loc.addr ); } return( p ); }