GUI: updated capstone_wrapper to remove RIP-relative text
This commit is contained in:
parent
f66acfa410
commit
8e601c72bf
|
@ -1 +1 @@
|
|||
Subproject commit 2034d2a0151866ae56fa51171788217d59c47a7b
|
||||
Subproject commit 1ff364d2f201e5ee66ad2de0e50b3bcc5b574e70
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue