-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
HP PA-RISC: Migrate to Capstone and add basic analysis #4469
base: dev
Are you sure you want to change the base?
Conversation
ctx->insn = NULL; | ||
ctx->count = cs_disasm(ctx->h, buf, len, a->pc, 1, &ctx->insn); | ||
if (ctx->count <= 0) { | ||
RZ_LOG_ERROR("HPPA: disasm error @ 0x%08" PFMT64x ", len = %d\n", a->pc, len); |
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.
remove this.
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.
It's here for debugging. Once PR is ready I will remove.
45de281
to
aa4f3b6
Compare
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.
Why an .inc
?
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.
Other architectures had the same "convention", I just followed it.
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.
Better not do it like this. Depending on the editor it can be annoying to debug, because it is not automatically detected as C file. Syntax highlighting fails etc.
So if their is no immediate advantage for it, better make it a normal .c file.
#define TOKEN(_type, _pat) \ | ||
do { \ | ||
RzAsmTokenPattern *pat = RZ_NEW0(RzAsmTokenPattern); \ | ||
pat->type = RZ_ASM_TOKEN_##_type; \ | ||
pat->pattern = strdup(_pat); \ | ||
rz_pvector_push(pvec, pat); \ | ||
} while (0) |
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.
We should probably move this to a general header. No idea which one though
60c7146
to
60b531f
Compare
60b531f
to
327c38d
Compare
Your checklist for this pull request
Detailed description
Now it is able to derive control flow properly for most common instructions:
Test plan
CI is green
Closing issues
Partially addresses rizinorg/ideas#1
Partially addresses #2704
Useful information