mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Display inline function name in local jump label.
This commit is contained in:
parent
8d626d25f0
commit
0596fac6f2
@ -3905,9 +3905,21 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
jumpOffset = 0;
|
||||
jumpBase = worker.GetSymbolForAddress( line.jumpAddr, jumpOffset );
|
||||
auto jumpSym = jumpBase == 0 ? worker.GetSymbolData( line.jumpAddr ) : worker.GetSymbolData( jumpBase );
|
||||
if( jumpSym ) jumpName = worker.GetString( jumpSym->name );
|
||||
if( jumpSym )
|
||||
{
|
||||
if( worker.HasInlineSymbolAddresses() )
|
||||
{
|
||||
const auto symAddr = worker.GetInlineSymbolForAddress( line.jumpAddr );
|
||||
if( symAddr != 0 )
|
||||
{
|
||||
const auto symData = worker.GetSymbolData( symAddr );
|
||||
if( symData ) jumpName = worker.GetString( symData->name );
|
||||
}
|
||||
}
|
||||
if( !jumpName ) jumpName = worker.GetString( jumpSym->name );
|
||||
if( jumpName ) normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::BeginGroup();
|
||||
TextColoredUnformatted( AsmColor( AsmOpTypeColors[(int)line.opType], inContext, isSelected ), line.mnemonic.c_str() );
|
||||
@ -4332,7 +4344,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
||||
ImGui::SameLine();
|
||||
if( jumpBase == m_baseAddr )
|
||||
{
|
||||
ImGui::TextDisabled( " -> [%s+%" PRIu32"]", normalized, jumpOffset );
|
||||
ImGui::TextDisabled( " -> [%s]", normalized );
|
||||
if( ImGui::IsItemHovered() )
|
||||
{
|
||||
UnsetFont();
|
||||
|
Loading…
Reference in New Issue
Block a user