Skip to content

Commit

Permalink
Fix some bugs in GUI display and art recording (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz authored Sep 3, 2024
1 parent ea1c660 commit 69c4482
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion libbs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.20.0"
__version__ = "1.20.1"


import logging
Expand Down
4 changes: 2 additions & 2 deletions libbs/api/decompiler_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def start_artifact_watchers(self):
@return:
"""
self.info("Starting BinSync artifact watchers...")
self.debug("Starting BinSync artifact watchers...")
self._artifact_watchers_started = True

def stop_artifact_watchers(self):
Expand All @@ -227,7 +227,7 @@ def stop_artifact_watchers(self):
decompiler. This is useful for plugins that want to watch for changes in the decompiler and
react to them.
"""
self.info("Stopping BinSync artifact watchers...")
self.debug("Stopping BinSync artifact watchers...")
self._artifact_watchers_started = False

@property
Expand Down
2 changes: 1 addition & 1 deletion libbs/artifacts/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Artifact:
ATTR_ATTR_IGNORE_SET
)

def __init__(self, last_change: Optional[datetime.datetime] = None):
def __init__(self, last_change: Optional[datetime.datetime] = None, **kwargs):
self.last_change = last_change
self._attr_ignore_set = set()

Expand Down
7 changes: 4 additions & 3 deletions libbs/decompilers/ida/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
idaapi.BWN_FUNCS: "functions",
idaapi.BWN_STRUCTS: "structs",
idaapi.BWN_ENUMS: "enums",
idaapi.BWN_TILIST: "types",
# this is idaapi.BWN_TILIST, but made into a constant for 8.3 compatibility
0x3c: "types",
}

FUNC_FORMS = {"decompilation", "disassembly"}
Expand Down Expand Up @@ -1390,8 +1391,8 @@ class MyForm(idaapi.Form):
def __init__(self, options):
self.dropdown = idaapi.Form.DropdownListControl(items=options)
form_string = ("STARTITEM 0\n"
f"{title}\n\n"
f"{question}:\n"
f"{title}\n"
f"{question}\n"
"<Options:{dropdown}>")
idaapi.Form.__init__(self, form_string, {'dropdown': self.dropdown})

Expand Down
4 changes: 2 additions & 2 deletions libbs/decompilers/ida/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def bs_type_deleted(self, ordinal):
elif old_type == Enum:
self.interface.enum_changed(Enum(old_name, members={}), deleted=True)
elif old_type == Typedef:
self.interface.typedef_changed(Typedef(nam=old_name), deleted=True)
self.interface.typedef_changed(Typedef(name=old_name), deleted=True)

del self.interface.cached_ord_to_type_names[ordinal]

Expand Down Expand Up @@ -170,7 +170,7 @@ def local_types_changed(self, ltc, ordinal, name):
is_typedef, name, type_name = compat.typedef_info(tif, use_new_check=True)
new_type_type = None
if is_typedef:
self.interface.typedef_changed(Typedef(nam=name, type_=type_name))
self.interface.typedef_changed(Typedef(name=name, type_=type_name))
new_type_type = Typedef
elif tif.is_struct():
bs_struct = compat.bs_struct_from_tif(tif)
Expand Down

0 comments on commit 69c4482

Please sign in to comment.