mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Darken assembly instructions which aren't in current context.
This commit is contained in:
parent
53111f9dd9
commit
748c22df8e
@ -3363,9 +3363,10 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
memcpy( buf+m_maxMnemonicLen, line.operands.c_str(), line.operands.size() + 1 );
|
memcpy( buf+m_maxMnemonicLen, line.operands.c_str(), line.operands.size() + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool isInContext = !m_calcInlineStats || !worker.HasInlineSymbolAddresses() || worker.GetInlineSymbolForAddress( line.addr ) == m_symAddr;
|
||||||
if( asmIdx == m_asmSelected )
|
if( asmIdx == m_asmSelected )
|
||||||
{
|
{
|
||||||
TextColoredUnformatted( ImVec4( 1, 0.25f, 0.25f, 1 ), buf );
|
TextColoredUnformatted( ImVec4( 1, 0.25f, 0.25f, isInContext ? 1.f : 0.5f ), buf );
|
||||||
}
|
}
|
||||||
else if( line.regData[0] != 0 )
|
else if( line.regData[0] != 0 )
|
||||||
{
|
{
|
||||||
@ -3383,17 +3384,31 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
}
|
}
|
||||||
if( hasDepencency )
|
if( hasDepencency )
|
||||||
{
|
{
|
||||||
TextColoredUnformatted( ImVec4( 1, 0.5f, 1, 1 ), buf );
|
TextColoredUnformatted( ImVec4( 1, 0.5f, 1, isInContext ? 1.f : 0.5f ), buf );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if( isInContext )
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted( buf );
|
ImGui::TextUnformatted( buf );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( buf );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if( isInContext )
|
||||||
{
|
{
|
||||||
ImGui::TextUnformatted( buf );
|
ImGui::TextUnformatted( buf );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( buf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t jumpOffset;
|
uint32_t jumpOffset;
|
||||||
uint64_t jumpBase;
|
uint64_t jumpBase;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user