mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 05:03:53 +00:00
Remove support for AT&T assembly syntax.
This commit is contained in:
parent
0d6fb703b4
commit
55823df56a
@ -257,7 +257,6 @@ SourceView::SourceView()
|
||||
, m_asmBytes( false )
|
||||
, m_asmShowSourceLocation( true )
|
||||
, m_calcInlineStats( true )
|
||||
, m_atnt( false )
|
||||
, m_hwSamples( true )
|
||||
, m_hwSamplesRelative( true )
|
||||
, m_childCalls( false )
|
||||
@ -706,7 +705,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
|
||||
}
|
||||
if( rval != CS_ERR_OK ) return false;
|
||||
cs_option( handle, CS_OPT_DETAIL, CS_OPT_ON );
|
||||
cs_option( handle, CS_OPT_SYNTAX, m_atnt ? CS_OPT_SYNTAX_ATT : CS_OPT_SYNTAX_INTEL );
|
||||
cs_option( handle, CS_OPT_SYNTAX, CS_OPT_SYNTAX_INTEL );
|
||||
cs_insn* insn;
|
||||
size_t cnt = cs_disasm( handle, (const uint8_t*)code, len, symAddr, 0, &insn );
|
||||
if( cnt > 0 )
|
||||
@ -879,9 +878,8 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
|
||||
if( ( m_cpuArch == CpuArchX64 || m_cpuArch == CpuArchX86 ) && op.id == X86_INS_LEA )
|
||||
{
|
||||
assert( op.detail->x86.op_count == 2 );
|
||||
const auto opidx = m_atnt ? 0 : 1;
|
||||
assert( op.detail->x86.operands[opidx].type == X86_OP_MEM );
|
||||
auto& mem = op.detail->x86.operands[opidx].mem;
|
||||
assert( op.detail->x86.operands[1].type == X86_OP_MEM );
|
||||
auto& mem = op.detail->x86.operands[1].mem;
|
||||
if( mem.base == X86_REG_INVALID )
|
||||
{
|
||||
if( mem.index == X86_REG_INVALID )
|
||||
@ -2359,13 +2357,6 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
|
||||
SmallCheckbox( ICON_FA_SHARE " Jumps", &m_showJumps );
|
||||
|
||||
if( m_cpuArch == CpuArchX64 || m_cpuArch == CpuArchX86 )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
if( SmallCheckbox( "AT&T", &m_atnt ) ) Disassemble( m_baseAddr, worker );
|
||||
|
||||
if( !m_atnt )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
@ -2420,7 +2411,6 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
@ -3936,7 +3926,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
|
||||
int opdesc = 0;
|
||||
const AsmVar* asmVar = nullptr;
|
||||
if( !m_atnt && ( m_cpuArch == CpuArchX64 || m_cpuArch == CpuArchX86 ) )
|
||||
if( m_cpuArch == CpuArchX64 || m_cpuArch == CpuArchX86 )
|
||||
{
|
||||
auto uarch = MicroArchitectureData[m_idxMicroArch];
|
||||
char tmp[32];
|
||||
@ -5569,7 +5559,7 @@ void SourceView::Save( const Worker& worker, size_t start, size_t stop )
|
||||
symName = worker.GetString( sym->name );
|
||||
}
|
||||
fprintf( f, "# Tracy Profiler disassembly of symbol %s [%s]\n\n", symName, worker.GetCaptureProgram().c_str() );
|
||||
if( !m_atnt ) fprintf( f, ".intel_syntax\n\n" );
|
||||
fprintf( f, ".intel_syntax\n\n" );
|
||||
|
||||
const auto end = m_asm.size() < stop ? m_asm.size() : stop;
|
||||
for( size_t i=start; i<end; i++ )
|
||||
|
@ -235,7 +235,6 @@ private:
|
||||
bool m_asmShowSourceLocation;
|
||||
bool m_calcInlineStats;
|
||||
uint8_t m_maxAsmBytes;
|
||||
bool m_atnt;
|
||||
uint64_t m_jumpPopupAddr;
|
||||
const CallstackFrameData* m_localCallstackPopup;
|
||||
bool m_hwSamples, m_hwSamplesRelative;
|
||||
|
Loading…
x
Reference in New Issue
Block a user