// terrible function - tries to identify entries in VTBL int fill_vtbl(char *name, ea_t vtbl, pdb_class *pc = NULL) { if ( NULL == p_pool ) return 0; if ( pc == NULL ) pc = p_pool->find_class(name); if ( !pc ) return -1; // no such class int max = pc->find_right_range(); if ( !max ) return 0; // empty vtbl ? struct vtbl_method *vm; int processed = 0; ///warning("processing %s (%d entries)", pc->m_name, max); ea_t mm = NULL; // message map ea_t cm = NULL; // command map // do_unknown_range(vtbl, max, false); - because first entry in VTBL is death for ( int i = 0; i <= max; i += sizeof(ea_t), vtbl += sizeof(ea_t)) { make_vtbl_entry(vtbl); vm = pc->by_offset(i); if ( vm != NULL ) { processed++; /* check for message map */ if ( !mm ) { mm = is_message_map_func(vtbl, vm->name); if ( mm ) process_message_map(mm, name); } /* check for command map */ if ( !cm ) { cm = is_command_map_func(vtbl, vm->name); if ( cm ) process_command_map(cm); } // set comment for entry in this VTBL rp_set_comment(vtbl, vm->name, false); // set function comment func_t *f = get_func(get_long(vtbl)); if ( f ) { char *fcmt = get_func_cmt(f, true); if ( fcmt ) del_func_cmt(f, false); set_func_cmt(f, vm->name, true); } } } return processed; }
void wrapped_del_func_cmt(func_t *fn, bool repeatable) { del_func_cmt(fn, repeatable); }