More jump targets to normalize.

This commit is contained in:
Bartosz Taudul 2022-08-19 12:50:47 +02:00
parent 2f219188e1
commit 414f467c6e
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3909,12 +3909,14 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
uint32_t jumpOffset;
uint64_t jumpBase;
const char* jumpName = nullptr;
const char* normalized = nullptr;
if( line.jumpAddr != 0 )
{
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( jumpName ) normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName;
}
if( ImGui::IsItemHovered() )
@ -3938,7 +3940,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
TextDisabledUnformatted( "External target:" );
}
ImGui::SameLine();
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
ImGui::Text( "%s+%" PRIu32, normalized, jumpOffset );
if( jumpBase == m_baseAddr )
{
uint32_t srcline;
@ -4077,7 +4079,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
TextDisabledUnformatted( "External target:" );
}
ImGui::SameLine();
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
ImGui::Text( "%s+%" PRIu32, normalized, jumpOffset );
if( jumpBase == m_baseAddr )
{
uint32_t srcline;
@ -4239,7 +4241,6 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
if( jumpName )
{
const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName;
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();