Exemplo n.º 1
0
static  bool    FuncGetLine( a_window *wnd, int row, int piece,
                             wnd_line_piece *line )
{
    address     addr;
    func_window *func = WndFunc( wnd );

    if( row >= NameListNumRows( NameList( func ) ) ) return( FALSE );
    addr = NameListAddr( NameList( func ), row );
    switch( piece ) {
    case PIECE_BREAK:
        FileBreakGadget( wnd, line, FALSE, FindBreak( addr ) );
        return( TRUE );
    case PIECE_NAME:
        line->indent = MaxGadgetLength;
        line->text = TxtBuff;
        line->extent = WND_MAX_EXTEND;
        FuncGetSourceName( wnd, row );
        return( TRUE );
    case PIECE_DEMANGLED:
        if( NameListName( NameList( func ), row, TxtBuff, SN_DEMANGLED ) == 0 ) {
            return( FALSE );
        }
        line->text = TxtBuff;
        line->use_prev_attr = TRUE;
        line->indent = MaxGadgetLength + func->max_name + 2 * WndAvgCharX( wnd );
        return( TRUE );
    default:
        return( FALSE );
    }
}
Exemplo n.º 2
0
void BreakAllModEntries( mod_handle handle )
{
    name_list   list;
    address     addr;
    int         i;
    bool        have_mod_cue;
    sym_info    sinfo;
    DIPHDL( cue, ch );
    DIPHDL( cue, ch_mod );

    NameListInit( &list, WF_CODE );
    NameListAddModules( &list, handle, false, true );
    have_mod_cue = FindFirstCue( handle, ch_mod );
    for( i = 0; i < NameListNumRows( &list ); ++i ) {
        addr = NameListAddr( &list, i );
        SymInfo( NameListHandle( &list, i ), NULL, &sinfo );
        if( !sinfo.is_global && !sinfo.is_public )
            continue;
        if( have_mod_cue && DeAliasAddrCue( handle, addr, ch ) != SR_NONE ) {
            if( CueFileId( ch ) != CueFileId( ch_mod ) ) {
                continue;
            }
        }
        if( FindBreak( addr ) != NULL ) {
            continue;
        }
        AddBreak( addr );
    }
    NameListFree( &list );
}
Exemplo n.º 3
0
extern void SymCompMatches( name_list *list, char *match, unsigned *pfirst, unsigned *plast )
{
    unsigned            first,last;
    unsigned            len;

    len = strlen( match );
    for( first = 0; first < NameListNumRows( list ); ++first ) {
        NameListName( list, first, TxtBuff, SN_SOURCE );
        if( strnicmp( match, TxtBuff, len ) == 0 ) break;
    }
    for( last = first; last < NameListNumRows( list ); ++last ) {
        NameListName( list, last, TxtBuff, SN_SOURCE );
        if( strnicmp( match, TxtBuff, len ) != 0 ) break;
    }
    *pfirst = first;
    *plast = last;
}
Exemplo n.º 4
0
bool    GlobGetLine( a_window *wnd, int row, int piece, wnd_line_piece *line )
{
    glob_window *glob = WndGlob( wnd );

    if( row >= NameListNumRows( NameList( glob ) ) ) return( false );
    switch( piece ) {
    case PIECE_NAME:
        NameListName( NameList( glob ), row, TxtBuff, SN_QUALIFIED );
        line->text = TxtBuff;
        return( true );
    default:
        return( false );
    }
}
Exemplo n.º 5
0
static  void    FuncModify( a_window *wnd, int row, int piece )
{
    address     addr;
    func_window *func = WndFunc( wnd );

    if( piece == PIECE_BREAK ) {
        if( row < 0 ) return;
        if( row >= NameListNumRows( NameList( func ) ) ) return;
        addr = NameListAddr( NameList( func ), row );
        func->toggled_break = ( ( UpdateFlags & UP_BREAK_CHANGE ) == 0 );
        ToggleBreak( addr );
        WndRowDirty( wnd, row );
    } else {
        WndFirstMenuItem( wnd, row, piece );
    }
}
Exemplo n.º 6
0
extern int GlobNumRows( a_window *wnd )
{
    return( NameListNumRows( NameList( WndGlob( wnd ) ) ) );
}
Exemplo n.º 7
0
static int FuncNumRows( a_window *wnd )
{
    return( NameListNumRows( NameList( WndFunc( wnd ) ) ) );
}