Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyclassinformer/mc_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def process_data(self):
self.dirtree.mkdir(dirtree_path)

bc_path = self.base_class_paths[vftable_ea]
if not bc_path:
continue
actual_class_name = bc_path[-1].name

# for vftable folder
Expand Down
8 changes: 8 additions & 0 deletions pyclassinformer/method_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def change_dir_of_ctors_dtors(paths, data, dirtree):
# move virtual functions to its class folder
for vftable_ea in paths:
path = paths[vftable_ea]
if not path:
continue

# get the class name that owns the vftable, which is the last entry of the path.
class_name = path[-1].name
Expand Down Expand Up @@ -62,6 +64,8 @@ def change_dir_of_vfuncs(paths, data, dirtree):
# move virtual functions to its class folder
for vftable_ea in paths:
path = paths[vftable_ea]
if not path:
continue

# get the class name that owns the vftable, which is the last entry of the path.
class_name = path[-1].name
Expand Down Expand Up @@ -136,6 +140,8 @@ def rename_func(ea, prefix="", fn="", is_lib=False):
def rename_vftable_ref_funcs(paths, data):
for vftable_ea in paths:
path = paths[vftable_ea]
if not path:
continue
col = data[vftable_ea]

# get the class name that owns the vftable, which is the last entry of the path.
Expand Down Expand Up @@ -163,6 +169,8 @@ def rename_funcs(func_eas, prefix="", is_lib=False):
def rename_vfuncs(paths, data):
for vftable_ea in paths:
path = paths[vftable_ea]
if not path:
continue
col = data[vftable_ea]

# get the class name that owns the vftable, which is the last entry of the path.
Expand Down
3 changes: 2 additions & 1 deletion pyclassinformer/pci_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def get_mdisp_bases(col, vftables):
col_offs = utils.get_col_offs(col, vftables)

bases = []
for path in col.chd.bca.paths[col.offset]:
paths = col.chd.bca.paths.get(col.offset, [])
for path in paths:
append = False
for bcd in path:
# for SI and MI but there is only a vftable
Expand Down