Skip to content

Commit

Permalink
Fix register type annotations (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
junron authored May 24, 2024
1 parent 4cec397 commit c8073eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions decomp2dbg/clients/gdb/gdb_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,10 @@ def update_function_data(self, addr):
for name, var in reg_vars.items():
type_str = self._clean_type_str(var['type'])
reg_name = var['reg_name']
expr = f"""(({type_str}) (${reg_name})"""
expr = f"""(({type_str}) (${reg_name}))"""

try:
val = gdb.parse_and_eval(expr)
gdb.execute(f"set ${name} = {val}")
gdb.execute(f"set ${name} = {expr}")
type_unknown = False
except Exception:
type_unknown = True
Expand Down

0 comments on commit c8073eb

Please sign in to comment.