-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
RzIL: add aezsue
to support Step until PC equals given address and output VM changes
#4466
Conversation
… output VM changes`
librz/arch/il/analysis_il.c
Outdated
RZ_API RzAnalysisILStepResult rz_analysis_il_vm_step_while( | ||
RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisILVM *vm, RZ_NULLABLE RzReg *reg, | ||
RZ_NONNULL cond_callback cond, RZ_NULLABLE void *user) { |
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.
If cond_callback
is used in the RZ_API
then is worth moving it with a proper name into the header.
RzAnalysisILStepResult res = RZ_ANALYSIS_IL_STEP_RESULT_SUCCESS; | ||
while (cond(vm, user)) { | ||
ut64 addr = rz_bv_to_ut64(vm->vm->pc); | ||
ut8 code[32] = { 0 }; | ||
analysis->read_at(analysis, addr, code, sizeof(code)); | ||
RzAnalysisOp op = { 0 }; | ||
rz_analysis_op_init(&op); |
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.
Move it outside
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.
I don't get it. It seems to me that rz_analysis_op_init
needs to be called before every call to rz_analysis_op
and rz_analysis_op_fini
needs to be called after every call to rz_analysis_op
.
So ‘Move it outside’ doesn't work? @pelijah
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.
Weird, rz_analysis_op_fini()
doesn't work as expected so leave it as is.
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.
@XVilka We definetely should standardize *_fini()
APIs behaviour.
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.
LGTM once @pelijah feedback is addressed.
Your checklist for this pull request
Detailed description
...
Test plan
...
Closing issues
...