-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
update 8051 anal plugin #15321
Merged
Merged
update 8051 anal plugin #15321
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The 8051 assembler has been R_APId, #included in the local scope, and called to fill op->mnemonic, which stops a bunch of warnings from appearing whenever a bunch of disassembly appears on the screen. The disassembler is called because of comments in r_anal.h: op->mnemonic should contain the entire disassembly, not just the mnemonic. Here's hoping the mnemonics and arguments will get split eventually.
In trying to make my analysis push out more info, it's difficult to understand what all these ints mean, while ACTUALLY they should be filled with enum values. By using the enum names, that's made clear immediately. r2's style is typedef over `enum name`, so that's what I did. the typedef-instead-of-int I added here isn't consistently propagated, and has caused warnings about unhandled cases-in-switch, at least some of which should just get a default: case added, but I'd rather leave it to the domain experts, or my future self when I become that domain expert.
it's pretty much static data with very meagre duplication, putting it in a switch-case is unwieldy.
op->cond, eob, nopcode, family, id they seem mostly useless, but it's not much work to add, so...
This pull request introduces 1 alert when merging 9d956c5 into 44b7de0 - view on LGTM.com new alerts:
|
radare
requested changes
Oct 22, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
:) Clearly I was using MASK_VAL incorrectly, the only hint to its use was: > // It fills RAnalop->dst/src info so even though it's named "VAL", it might not actually need to fill RAnalop->val... Nor ptr, and definitely not jump and fail, which means we don't have use for it yet! Not until I actually implement ->dst/src
if the code calling ranalop needs VAL to work, it should be passing |VAL in the mask |
this broke the build on macOS btw |
I know
… On 23 Oct 2019, at 09:16, Marco Grassi ***@***.***> wrote:
this broke the build on macOS btw
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
handle 8051 ANAL_OP DISASM
The 8051 assembler has been R_APId, #included and called to fill
op->mnemonic, which stops a bunch of warnings from appearing
whenever a bunch of disassembly appears on the screen.
The disassembler is called because of comments in r_anal.h: op->mnemonic
should contain the entire disassembly, not just the mnemonic.
Here's hoping the mnemonics and arguments will get split eventually.
typdef some RAnal enums
In trying to make my analysis push out more info, it's difficult to
understand what all these ints mean, while ACTUALLY they should be
filled with enum values. By using the enum names, that's made clear
immediately.
r2's style is typedef over
enum name
, so that's what I did.the typedef-instead-of-int I added here isn't consistently propagated,
and has caused warnings about unhandled cases-in-switch, at least some
of which should just get a default: case added, but I'd rather leave it
to the domain experts, or my future self when I become that domain
expert.
add more basic info
cycles, cond, eob, nopcode, family, id