static bool CallGetLine( a_window *wnd, int row, int piece, wnd_line_piece *line ) { call_chain *chain; call_window *call = WndCall( wnd ); chain = GetCallChain( &call->tb, row ); if( chain == NULL ) return( false ); line->extent = WND_MAX_EXTEND; switch( piece ) { case PIECE_SYMBOL: StrCopy( ":", StrCopy( chain->symbol, TxtBuff ) ); line->text = TxtBuff; return( true ); case PIECE_SOURCE: line->indent = call->max_sym_len + 3 * WndAvgCharX( wnd ); line->tabstop = FALSE; line->use_prev_attr = TRUE; if( chain->source_line == NULL ) { line->text = TxtBuff; UnAsm( chain->lc.execution, TxtBuff, TXT_LEN ); } else { line->text = chain->source_line; } return( true ); default: return( false ); } }
static void DumpSource( void ) { char buff[256]; DIPHDL( cue, ch ); if( _IsOn( SW_TASK_RUNNING ) ) { printf( "I don't know where the task is. It's running\n" ); } if( DeAliasAddrCue( NO_MOD, GetCodeDot(), ch ) == SR_NONE || !DUIGetSourceLine( ch, buff, sizeof( buff ) ) ) { UnAsm( GetCodeDot(), buff, sizeof( buff ) ); } printf( "%s\n", buff ); }
static void RepInitEv( event_record *ev ) { DIPHDL( cue, ch ); if( ev->cue == NULL ) { if( DeAliasAddrCue( NO_MOD, ev->ip, ch ) != SR_NONE ) { ev->cue = CopySourceLine( ch ); } if( ev->cue == NULL ) { UnAsm( ev->ip, TxtBuff, TXT_LEN ); ev->cue = DupStr( TxtBuff ); } } if( ev->addr_string == NULL ) { ev->addr_string = DupStr( GetEventAddress( ev ) ); } }
void GetBPText( brkp *bp, char *buff ) { unsigned max; //MAD: might be a different mad then when break set max = ~0; if( IS_BP_EXECUTE( bp->th ) ) { if( bp->source_line != NULL ) { strcpy( buff, bp->source_line ); } else { if( IS_NIL_ADDR( bp->loc.addr ) ) { strcpy( buff, LIT_ENG( Quest_Marks ) ); } else { UnAsm( bp->loc.addr, buff, max ); } } } else { MADTypeHandleToString( CurrRadix, bp->th, &bp->item, buff, &max ); } }