Display inline function name in local jump label.

This commit is contained in:
Bartosz Taudul 2022-09-19 00:33:18 +02:00
parent 8d626d25f0
commit 0596fac6f2
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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();