From 8e601c72bfe37f9f29b29b5ee0877a420764a2a1 Mon Sep 17 00:00:00 2001 From: mrexodia Date: Fri, 10 Mar 2017 23:08:12 +0100 Subject: [PATCH] GUI: updated capstone_wrapper to remove RIP-relative text --- src/capstone_wrapper | 2 +- src/gui/Src/Gui/CPUDisassembly.cpp | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/capstone_wrapper b/src/capstone_wrapper index 2034d2a0..1ff364d2 160000 --- a/src/capstone_wrapper +++ b/src/capstone_wrapper @@ -1 +1 @@ -Subproject commit 2034d2a0151866ae56fa51171788217d59c47a7b +Subproject commit 1ff364d2f201e5ee66ad2de0e50b3bcc5b574e70 diff --git a/src/gui/Src/Gui/CPUDisassembly.cpp b/src/gui/Src/Gui/CPUDisassembly.cpp index 8792db8e..a9035f82 100644 --- a/src/gui/Src/Gui/CPUDisassembly.cpp +++ b/src/gui/Src/Gui/CPUDisassembly.cpp @@ -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 {