-
Notifications
You must be signed in to change notification settings - Fork 62
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
repz lifting question #15
Comments
Yes, I understand your concern. It may seem weird, but here, we would like to consider each iteration of a REPZ instruction as a "separate" instruction. In fact, such an assumption is not uncommon. For example, when you are taking an instruction-level execution trace from Pin, it will instrument every iteration of a REPZ instruction too. When you do single-stepping with GDB, the same assumption holds. So we decided to explicitly separate each iteration with |
Ok gotcha. Thanks for the clarification :) |
Hi @sangkilc, sorry to bother you again on this but I struggle to understand how the statements should be interpreted, in particular by considering the following instructions:
which is lifted in the following statements:
and
which is lifted in the following statements:
Initially I supposed that we have to emulate the statements in a sequential order and in the first sample it makes sense. But for the second example this strategy doesn't work, since EIP would assume always the same value. Also, I have to admit that is not very clear to me why the |
Okay it seems that you found a bug! Especially the loop instruction looks wrong. I will follow up on this soon. Sorry about the brevity. |
Okay here is what's happening.
Now, if you look at the loop -0x3 case, Nonetheless, the loop instruction looks wrong, because it should not contain internal (within an instruction) loop as you pointed out. I will create two follow-up issues to handle this problem. First, I don't like the current way of pretty-printing |
OK understood, I updated my code in order to follow your indication. Thanks for the explanation :) |
Hi,
I noticed that if we consider the following instruction:
it is lifted to the following statements:
This is conceptually correct but it is a bit weird, it is like if we are executing something as
until some condition happens (in this case ECX = 0). Would it be better to have something like this one?
The text was updated successfully, but these errors were encountered: