mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
More jump targets to normalize.
This commit is contained in:
parent
2f219188e1
commit
414f467c6e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user