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

support 64 bit retval for stub #1034

Merged
merged 1 commit into from Dec 30, 2023
Merged

support 64 bit retval for stub #1034

merged 1 commit into from Dec 30, 2023

Conversation

Angelo942
Copy link
Contributor

Description

The return (int) X command in gdb only sets the 4 lowest bytes of the return register. For example if rax was -1, a return int 0 would leave us with 0xffffffff000000 instead of 0x0.

This patch makes StubBreakpoint check for the register size and executes return (int) or return (long) accordingly.

Checklist

  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • If my change adds new code, adequate tests have been added.
  • I have read and agree to the CONTRIBUTING document.

Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@hugsy hugsy added this to the 2024.01 milestone Dec 29, 2023
@hugsy hugsy merged commit a2704c9 into hugsy:main Dec 30, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants