Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Do not submit) - draft for adapting to capstone arm64 renaming #671

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions server/TracySourceView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
break;
case CpuArchArm64:
rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
rval = cs_open( CS_AARCH64pre(CS_ARCH_), CS_MODE_ARM, &handle );
break;
default:
assert( false );
Expand Down Expand Up @@ -776,9 +776,9 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
}
break;
case CpuArchArm64:
if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
if( detail.CS_aarch64().op_count == 1 && detail.CS_aarch64().operands[0].type == CS_AARCH64(_OP_IMM) )
{
jumpAddr = (uint64_t)detail.arm64.operands[0].imm;
jumpAddr = (uint64_t)detail.CS_aarch64().operands[0].imm;
}
break;
default:
Expand Down Expand Up @@ -863,18 +863,18 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
}
break;
case CpuArchArm64:
for( uint8_t i=0; i<detail.arm64.op_count; i++ )
for( uint8_t i=0; i<detail.CS_aarch64().op_count; i++ )
{
uint8_t type = 0;
switch( detail.arm64.operands[i].type )
switch( detail.CS_aarch64().operands[i].type )
{
case ARM64_OP_IMM:
case CS_AARCH64(_OP_IMM):
type = 0;
break;
case ARM64_OP_REG:
case CS_AARCH64(_OP_REG):
type = 1;
break;
case ARM64_OP_MEM:
case CS_AARCH64(_OP_MEM):
type = 2;
break;
default:
Expand Down
6 changes: 3 additions & 3 deletions server/TracyWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3840,7 +3840,7 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
break;
case CpuArchArm64:
rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
rval = cs_open( CS_AARCH64pre(CS_ARCH_), CS_MODE_ARM, &handle );
break;
default:
assert( false );
Expand Down Expand Up @@ -3884,9 +3884,9 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
}
break;
case CpuArchArm64:
if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
if( detail.CS_aarch64().op_count == 1 && detail.CS_aarch64().operands[0].type == CS_AARCH64(_OP_IMM) )
{
callAddr = (uint64_t)detail.arm64.operands[0].imm;
callAddr = (uint64_t)detail.CS_aarch64().operands[0].imm;
}
break;
default:
Expand Down
Loading