Beispiel #1
0
static bool CheckLoadDebugInfo( image_entry *image, file_handle fh,
                        unsigned start, unsigned end )
{
    char        buff[TXT_LEN];
    char        *symfile;
    unsigned    prio;
    char        *endstr;

    prio = start;
    for( ;; ) {
        prio = DIPPriority( prio );
        if( prio == 0 || prio > end )
            return( false );
        DIPStatus = DS_OK;
        image->dip_handle = DIPLoadInfo( fh, sizeof( image_entry * ), prio );
        if( image->dip_handle != NO_MOD )
            break;
        if( DIPStatus & DS_ERR ) {
            symfile = image->symfile_name;
            if( symfile == NULL )
                symfile = image->image_name;
            endstr = Format( buff, LIT_ENG( Sym_Info_Load_Failed ), symfile );
            *endstr++ = ' ';
            StrCopy( DIPMsgText( DIPStatus ), endstr );
            Warn( buff );
            return( false );
        }
    }
    *(image_entry **)ImageExtra( image->dip_handle ) = image;
    return( true );
}
Beispiel #2
0
static bool CheckLoadDebugInfo( image_entry *image, file_handle fh, dip_priority start, dip_priority end )
{
    char            buff[TXT_LEN];
    char            *symfile;
    dip_priority    priority;
    char            *endstr;

    image->dip_handle = NO_MOD;
    for( priority = start - 1; (priority = DIPPriority( priority )) != 0; ) {
        if( priority > end )
            return( false );
        DIPStatus = DS_OK;
        image->dip_handle = DIPLoadInfo( FH2FP( fh ), sizeof( image_entry * ), priority );
        if( image->dip_handle != NO_MOD )
            break;
        if( DIPStatus & DS_ERR ) {
            symfile = image->symfile_name;
            if( symfile == NULL )
                symfile = image->image_name;
            endstr = Format( buff, LIT_ENG( Sym_Info_Load_Failed ), symfile );
            *endstr++ = ' ';
            StrCopy( DIPMsgText( DIPStatus ), endstr );
            Warn( buff );
            return( false );
        }
    }
    *(image_entry **)DIPImageExtra( image->dip_handle ) = image;
    return( true );
}