imp_mod_handle DIPENTRY DIPImpCueMod( imp_image_handle *ii, imp_cue_handle *ic ) /**********************************************************/ { /* Return the module the source cue comes from. */ ii = ii; return( IMX2IM (ic->imx ) ); }
imp_mod_handle CuTag2Mod( imp_image_handle *ii, dr_handle cu_handle ) /******************************************************************************/ // Look up cu_handle in mod_map { im_idx i; mod_info *modinfo; modinfo = ii->mod_map; for( i = 0; i < ii->mod_count; ++i ) { if( cu_handle == modinfo->cu_tag ) { return( IMX2IM( i ) ); } ++modinfo; } return( IMH_NOMOD ); }
walk_result DIGENTRY DIPImpWalkModList( imp_image_handle *ii, IMP_MOD_WKR *wk, void *d ) { im_idx i; walk_result ret; dr_dbg_handle saved; ret = WR_CONTINUE; for( i = 0; i < ii->mod_count; ++i ) { saved = DRGetDebug(); ret = wk( ii, IMX2IM( i ), d ); DRSetDebug( saved ); if( ret != WR_CONTINUE ) { break; } } return( ret ); }
imp_mod_handle DwarfMod( imp_image_handle *ii, dr_handle mod_handle ) /*********************************************************************/ // find the imp_mod_handle where a dwarf dbginfo comes from { im_idx i; im_idx last; mod_info *modinfo; if( ii->mod_count == 0 ) return( IMH_NOMOD ); modinfo = ii->mod_map + 1; last = ii->mod_count - 1; for( i = 0; i < last; ++i ) { if( mod_handle < modinfo->mod_handle ) { break; } ++modinfo; } return( IMX2IM( i ) ); }
walk_result DFWalkModListSrc( imp_image_handle *ii, bool src, IMP_MOD_WKR wk, void *d ) { im_idx i; walk_result ret; dr_dbg_handle saved; mod_info *modinfo; ret = WR_CONTINUE; modinfo = ii->mod_map; for( i = 0; i < ii->mod_count; ++i ) { if( src == modinfo->has_pubnames ) { saved = DRGetDebug(); ret = wk( ii, IMX2IM( i ), d ); DRSetDebug( saved ); if( ret != WR_CONTINUE ) { break; } } ++modinfo; } return( ret ); }