Skip to content

Commit

Permalink
support 64 bit retval for stub
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo942 committed Dec 29, 2023
1 parent 951872b commit 96ae823
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -4147,7 +4147,8 @@ def __init__(self, func: str, retval: Optional[int]) -> None:
return

def stop(self) -> bool:
gdb.execute(f"return (unsigned int){self.retval:#x}")
size = "long" if gef.arch.ptrsize == 8 else "int"
gdb.execute(f"return (unsigned {size}){self.retval:#x}")
ok(f"Ignoring call to '{self.func}' "
f"(setting return value to {self.retval:#x})")
return False
Expand Down

0 comments on commit 96ae823

Please sign in to comment.