Closed roblabla closed 1 year ago
I have little idea also. But it seems reasonable.
Now the code tries first to search for r"\*(.*)\("
, and then r"\*(.*)"
as a fallback if it fails, performing the same logic if either matches. But the second should imply the first, so can we just get rid of the first check?
You'd think so, but actually no! I initially did that as well, but it broke on instructions of the form whatever *0x12(%eax)
, because now we would try to run int("0x12(%eax)", 16)
which is also wrong ^^.
Ah! Maybe we can do \*([0-9x]+)
?
hmm, yeah that might work
This would fail on
calll *0x123456
instructions with an exception claiming it failed to parse*0x123456
as an int because of the prefixed star.I'm not sure if this fix is correct - I have absolutely no clue what much of the code in here is trying to do. But it does allow the differ to continue.