//----------------------------------------------------------------------- // visible for converter only uchar set_exception_xref(SegInfo *ps, Exception const & exc, ea_t ea) { uchar ans = 0; if ( exc.start_pc >= ps->CodeSize ) ans = 1; else { if ( !exc.start_pc ) ps->id.extflg |= XFL_M_LABSTART; // special label at entry add_dref(ea, ps->startEA + exc.start_pc, dr_I); } if ( exc.end_pc > ps->CodeSize ) ans = 1; else { if ( exc.end_pc == ps->CodeSize ) ps->id.extflg |= XFL_M_LABEND; // special label at end add_dref(ea, ps->startEA + exc.end_pc, dr_I); } if ( exc.handler_pc >= ps->CodeSize) return(1 ); add_dref(ea, ps->startEA + exc.handler_pc, dr_I); return(ans); }
void make_RTStruct(ea_t adr, size_t namelen) { /* form struct */ do_unknown_range(adr, RT_len, true); doDwrd(adr,4); doDwrd(adr+4,4); doDwrd(adr+8,4); doDwrd(adr+12,4); doDwrd(adr+16,4); // doDwrd(adr+20,4); /* add dref to class name */ ea_t ptr = get_long(adr); make_ascii_string(ptr, namelen, ASCSTR_C); add_dref(adr, ptr, dr_O); op_offset(adr, OPND_MASK, REF_OFF32, ptr); rp_set_comment(adr+4, "Size", false); /* add cref to constructor */ ptr = get_long(adr+12); if ( ptr ) { add_cref(adr+12, ptr, fl_CN); op_offset(adr+12, OPND_MASK, REF_OFF32, ptr); } /* add dref to base class struct */ ptr = get_long(adr+16); if ( ptr ) { add_dref(adr+16,ptr,dr_O); op_offset(adr+16, OPND_MASK, REF_OFF32, ptr); } /* add dref to next class */ /* ptr = get_long(adr+20); if ( ptr ) { add_dref(adr+20,ptr,dr_O); op_offset(adr+20, OPND_MASK, REF_OFF32, ptr); } */ }
static void do_dref(ea_t from, ea_t to) { add_dref(from, to, dr_O); op_offset(from, OPND_MASK, REF_OFF32, to); }