mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 04:17:25 +00:00
VTable End on Reference
This commit is contained in:
parent
d39970e83b
commit
8fb26b919b
@ -113,6 +113,7 @@ static bool vtable_section_can_contain_vtables(RVTableContext *context, RBinSect
|
||||
!strcmp(section->name, ".data.rel.ro");
|
||||
}
|
||||
|
||||
|
||||
static int vtable_is_addr_vtable_start(RVTableContext *context, ut64 curAddress) {
|
||||
RAnalRef *xref;
|
||||
RListIter *xrefIter;
|
||||
@ -185,6 +186,11 @@ R_API RList *r_anal_vtable_search(RVTableContext *context) {
|
||||
while (vtable_is_value_in_text_section (context, startAddress)) {
|
||||
noOfMethods++;
|
||||
startAddress += context->word_size;
|
||||
|
||||
// a ref means the vtable has ended
|
||||
if (!r_list_empty (r_anal_xrefs_get (context->anal, startAddress))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
vtable->method_count = noOfMethods;
|
||||
r_list_append (vtables, vtable);
|
||||
|
Loading…
x
Reference in New Issue
Block a user