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

Remove the assert on get_register #754

Merged
merged 3 commits into from
Nov 28, 2021

Conversation

hugsy
Copy link
Owner

@hugsy hugsy commented Nov 26, 2021

Remove the assert on get_register

assert are bad, so we remove one here, and give a second chance for get_register to execute properly if/when register doesn't start with a $ (like PPC or MIPS at least).

Description/Motivation/Screenshots

Register names don't always start with $ (sometimes nothing - MIPS/PPC, something $ - x64, sometimes % - SPARC).
This PR allows get_register to still attempt to get the value using Frame.read_register() even if the register doesn't start with $.

This PR should fix #752

How Has This Been Tested?

Architecture Yes/No Comments
x86-32 ✔️
x86-64 ✔️
ARM ✔️
AARCH64 ✔️
MIPS ✔️
POWERPC ✔️
SPARC
RISC-V

Checklist

  • My PR was done against the dev branch, not master.
  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • My change adds tests as appropriate.
  • I have read and agree to the CONTRIBUTING document.

gef.py Outdated Show resolved Hide resolved
@hugsy hugsy merged commit 34a14bc into dev Nov 28, 2021
@hugsy hugsy deleted the 752_update_register_format_for_get_register branch November 28, 2021 04:40
hugsy pushed a commit that referenced this pull request Nov 28, 2021
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.

"Command 'context' failed to execute properly" on branching instructions while remote debugging MIPS
2 participants