Ejemplo n.º 1
0
static bool CheckEntry( drmem_hdl abbrev, drmem_hdl mod, mod_scan_info *minfo, void *data )
/*****************************************************************************************/
{
    int                 index;
    sym_search_data     *sinfo;
    dr_sym_context      symctxt;

    sinfo = (sym_search_data *)data;

    symctxt.handle = minfo->handle;
    symctxt.context = minfo->context;

    symctxt.name = NULL;
    if( sinfo->name != NULL ) {
        symctxt.name = DWRGetName( abbrev, mod );
        if( symctxt.name == NULL )
            return( true );
        if( !RegExec( sinfo->name, symctxt.name, true ) ) {
            DWRFREE( symctxt.name );
            return( true );
        }
    }

    symctxt.type = DR_SYM_MACRO;
    for( index = 0; index < DR_SYM_NOT_SYM; index++ ) {
        if( DWRSearchArray( SearchTags[index], minfo->tag ) ) {
            symctxt.type = index;
            break;
        }
    }

    return( sinfo->callback( &symctxt, sinfo->data ) );
}
Ejemplo n.º 2
0
char *DRGetName( drmem_hdl entry )
/********************************/
{
    drmem_hdl   abbrev;

    abbrev = DWRSkipTag( &entry ) + 1;
    return( DWRGetName( abbrev, entry ) );
}
Ejemplo n.º 3
0
static dr_handle ScopeLastNameable( dr_scope_stack *scope, char **name )
/**********************************************************************/
{
    int             i;
    dr_handle       tmp_entry;
    dr_handle       abbrev;

    for( i = scope->free; i > 0; i -= 1 ) {
        tmp_entry = scope->stack[i - 1];

        if( !DWRReadTagEnd( &tmp_entry, &abbrev, NULL ) ) {
            abbrev++;   /* skip child flag */
            *name = DWRGetName( abbrev, tmp_entry );
            if( *name != NULL ) {
                return( scope->stack[i - 1] );
            }
        }
    }
    return( 0 );
}