1
0
Fork 0

GUI: updated capstone_wrapper to remove RIP-relative text

This commit is contained in:
mrexodia 2017-03-10 23:08:12 +01:00
parent f66acfa410
commit 8e601c72bf
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 1 additions and 18 deletions

@ -1 +1 @@
Subproject commit 2034d2a0151866ae56fa51171788217d59c47a7b
Subproject commit 1ff364d2f201e5ee66ad2de0e50b3bcc5b574e70

View File

@ -1018,23 +1018,6 @@ void CPUDisassembly::assembleSlot()
QString actual_inst = instr.instStr;
//replace [rip +/- 0x?] with the actual address
bool ripPlus = true;
auto found = actual_inst.indexOf("[rip + ");
if(found == -1)
{
ripPlus = false;
found = actual_inst.indexOf("[rip - ");
}
if(found != -1)
{
auto end = actual_inst.indexOf("]", found);
auto ripStr = actual_inst.mid(found + 1, end - found - 1);
auto offset = ripStr.mid(ripStr.lastIndexOf(' ') + 1).toULongLong(nullptr, 16);
auto dest = ripPlus ? (wVA + offset + instr.length) : (wVA - offset + instr.length);
actual_inst.replace(ripStr, "0x" + ToHexString(dest).toLower());
}
bool assembly_error;
do
{