Closed ek0 closed 1 year ago
Hey @ek0,
Thanks for this MR. I do remember thinking about that feature when implementing the small hack, but I do not remember why I did not do it... (maybe to lazy?). Let me few days to see if there is no hidden issue behind this feature and if everything looks good to me, I will merge this one :).
Cheers,
sorry I've wrongly merged these commits and I had to revert them. Can you redo the MR?
Sure thing, let me do this quickly
Hey @JonathanSalwan,
This is a small proposal, and hopefully a small enough change. If you could give some feedback it would be much appreciated :)
Currently, apart the disassembly string, symbolic expressions don't have any information regarding the original instruction that was used for lifting. Having the original address embedded in the symbolic expression would be useful to do backtracking using the backward slicing functionality (through
sliceExpressions
)For example: looking at the dead store elimination simplification, it seems there's a small hack parsing the disassembly string to retrieve the original instruction address.
If we keep this information in the symbolic expression this would not be required.
address
field to theSymbolicExpression
object. With a setter and a getter. And everytime a new expression is created from an instruction we set this value.std::optional
instead of auint64_t
to reflect the absence of address?setAddress(getAddress())
inInstruction::addSymbolicExpression
. But from an ownership point of view it feels better if it is set as it is done in this PR.