static BOOL process_vtbl(ea_t &ea_sect)
{
	VTBL_info_t vftable_info_t;
	if(get_vtbl_info(ea_sect, vftable_info_t))
	{
		ea_sect = vftable_info_t.ea_end;
		ea_t ea_assumed;
		verify_32_t((vftable_info_t.ea_begin - 4), ea_assumed);

		if(vftable_info_t.methods > 1)
		{
			if(has_user_name(getFlags(vftable_info_t.ea_begin)))
			{							
				vftable_info_t.vtbl_name = get_short_name(vftable_info_t.ea_begin);

				qstring vtbl_info_str;
				vtbl_info_str.cat_sprnt(" 0x%x - 0x%x:  %s  methods count: %d", vftable_info_t.ea_begin, vftable_info_t.ea_end, vftable_info_t.vtbl_name.c_str(), vftable_info_t.methods);
				vtbl_list.push_back(vtbl_info_str);

				vtbl_t_list.push_back(vftable_info_t);

				return(TRUE);
			}
		}

		return(FALSE);
	}

	ea_sect += sizeof(UINT);	
	return(FALSE);
}
예제 #2
0
//----------------------------------------------------------------------
static void TouchArg(op_t &x, int isload)
{
  switch ( x.type )
  {
    case o_displ:
    case o_imm:
      if ( op_adds_xrefs(uFlag, x.n) )
      {
        int outf = x.type != o_imm ? OOF_ADDR : 0;
        ua_add_off_drefs2(x, dr_O, outf|OOF_SIGNED);
      }
      break;

    case o_mem:
    case o_ind_mem:
    case o_reg:
    case o_ind_reg:
      {
        ea_t dea;
        if ( x.type == o_mem || x.type == o_ind_mem )
        {
          dea = map_addr(x.addr, x.n, true);
        }
        else
        {
          if ( x.reg >= rRR0 )
            dea = map_addr(x.reg - rRR0, x.n, true);
          else
            dea = map_addr(x.reg - rR0, x.n, true);
        }
        ua_dodata2(x.offb, dea, x.dtyp);
        if ( !isload )
          doVar(dea);
        ua_add_dref(x.offb, dea, isload ? dr_R : dr_W);
        if ( !has_user_name(get_flags_novalue(dea)) && dea > intmem)
        {
          char buf[10];
          int num = dea - intmem;
          if ( num < 0x100 )
          {
            qsnprintf(buf, sizeof(buf), "R%d", num);
          }
          else if ( num < 0x1000 )
          {
            qsnprintf(buf, sizeof(buf), "ERF_%X_%d", num >> 8, num & 0xFF);
          }
          else
          {
            int reg_no     = ((num >> 4) & 0xF0) + (num & 0xF);
            int subbank_no = ((num >> 4) & 0xF) + 1;
            qsnprintf(buf, sizeof(buf), "R%d_%X", reg_no, subbank_no);
          }
          set_name(dea, buf, SN_NOWARN);
        }
예제 #3
0
파일: emu.cpp 프로젝트: nealey/vera
//----------------------------------------------------------------------
static void destroy_if_unnamed_array(ea_t ea)
{
    flags_t F = get_flags_novalue(ea);
    if ( isTail(F) && segtype(ea) == SEG_IMEM )
    {
        ea_t head = prev_not_tail(ea);
        if ( !has_user_name(get_flags_novalue(head)) )
        {
            do_unknown(head, DOUNK_SIMPLE);
            doByte(head, ea-head);
            ea_t end = nextthat(ea, inf.maxEA, f_isHead, NULL);
            if ( end == BADADDR ) end = getseg(ea)->endEA;
            doByte(ea+1, end-ea-1);
        }
    }
}