-
Notifications
You must be signed in to change notification settings - Fork 115
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
Can I build an IRSB from a combination of instructions and IR? #41
Comments
Are you doing this in the context of angr, or in a separate system? In angr, the easiest thing would be to make a hook at the address in question (using If you're doing this outside of angr, the IRSBs themselves can certainly be modified, but how to do that depends on the framework you're using. |
The main problem is that there's no way right now to construct any of the PyVEX classes manually - all of the IRStmt, IRExpr, etc classes have constructors that require a pointer into a libVEX native object. We'd have to add alternate constructors that allow manual construction. |
Okay, so I guess its not currently possible. I am using angr, but on a lower level [i.e not using the binary loader or such]. I am using simuvex and irsbs to execute my instructions. |
Yeah, then I think the only way would be SimInspect breakpoints, or implement the functionality in whatever wrapper you have around simuvex... I'll close this issue for now; please reopen it if you have further questions! |
So, I am running instructions, and between instructions I want to set some registers & memory locations to fix values - these are known before generation of the IRSB.
I know I can use the breakpoints to do what I want, but I was hoping to do it without breakpoints - mainly because I don't want to keep track of where in the execution I am - but also because I hope to gain speed.
I could probably add extra instructions, but this would require me to also modify the instruction pointer after each added instruction - probably creating more problems. Also, it would make me bound to a specific instruction set.
So, my hope is to, given a list of normal instructions in binary format, and some points where I want to change register data, build a list of normal instructions and single registry/memory modifying IR instructions that can be used to build one IRSB.
Is this possible and how?
The text was updated successfully, but these errors were encountered: