Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a basetype confusion when user-defined types are arrayed #140

Merged
merged 1 commit into from
Jan 17, 2025
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: 1 addition & 1 deletion libbs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.8.1"
__version__ = "2.8.2"


import logging
Expand Down
11 changes: 8 additions & 3 deletions libbs/api/decompiler_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,11 +850,16 @@ def get_defined_type(self, type_str) -> Optional[Artifact]:
# it was not parseable
return None

# type is known and parseable
if not type_.is_unknown:
# type is a primitive that returns no base type
base_type = type_.base_type
if base_type is None:
return None

base_type_str = type_.base_type.type
# if we trigger here, it means it's not a user-defined type
if not base_type.is_unknown:
return None

base_type_str = base_type.type
# use a speical handler for ghidra until a later issue is fixed
if self.name == "ghidra":
return self._find_ghidra_type_name_in_types(base_type_str)
Expand Down
Loading