A valid type_info/TypeDescriptor at pointer?
| 216 | |
| 217 | // A valid type_info/TypeDescriptor at pointer? |
| 218 | bool RTTI::type_info::isValid(ea_t typeInfo) |
| 219 | { |
| 220 | // TRUE if we've already seen it |
| 221 | if (tdSet.find(typeInfo) != tdSet.end()) |
| 222 | return true; |
| 223 | |
| 224 | if (is_loaded(typeInfo)) |
| 225 | { |
| 226 | // Verify what should be a vftable |
| 227 | ea_t ea = getEa(typeInfo + offsetof(type_info, vfptr)); |
| 228 | if (is_loaded(ea)) |
| 229 | { |
| 230 | // _M_data should be NULL statically |
| 231 | ea_t _M_data = BADADDR; |
| 232 | if (getVerifyEa((typeInfo + offsetof(type_info, _M_data)), _M_data)) |
| 233 | { |
| 234 | if (_M_data == 0) |
| 235 | return(isTypeName(typeInfo + offsetof(type_info, _M_d_name))); |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | return false; |
| 241 | } |
| 242 | |
| 243 | // Returns TRUE if known typename at address |
| 244 | bool RTTI::type_info::isTypeName(ea_t name) |
nothing calls this directly
no test coverage detected