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

[MSP430] Removed code which deletes indicator characters for certain asm syntaxes #4522

Merged

Conversation

moste00
Copy link
Contributor

@moste00 moste00 commented May 29, 2024

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

This should fix issue #3324 in Cutter's bug log.

...

Test plan

I have searched in the git history and tracked the introduction of the deleted code to commit hash c83d5f4664f222f318f8e4ae3910aeb9e5515902, I have tried to find any PR or detailed message associated with this hash, explaining why the code was needed, but I found none, the commit was probably added sometimes in the project's pre-history (back when it was radare2).

As far as I can see, the deleted code has no other effect or purpose except the undesirable effect of deleting indicator characters from the disassembly when the asm syntax isn't AT&T. Any tests breaking due to the removal of this code are wrong tests that should be removed as well.

To verify

Run rz-asm -a msp430 -d 3f401000 on dev and then on this PR's branch. On dev, it produces mov 0x0010, r15 as output, which is wrong, the correct output should include the character '#' before the constant, as it appears on this PR's branch.

@moste00 moste00 requested a review from wargio as a code owner May 29, 2024 19:28
@moste00 moste00 force-pushed the msp430_fix_indicator_characters_removal branch 2 times, most recently from a7b9bcf to a2e20e8 Compare May 29, 2024 20:55
…xes, indicator characters should always show up
@moste00 moste00 force-pushed the msp430_fix_indicator_characters_removal branch from a2e20e8 to ff99249 Compare May 29, 2024 21:50
Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

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

LGTM with a small request

test/db/asm/msp430 Show resolved Hide resolved
@XVilka XVilka merged commit aca16be into rizinorg:dev May 30, 2024
44 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.

MSP430 disassembly, missing indicator for Immediate Value or Memory Location
2 participants