mirror of
https://github.com/wolfpld/tracy.git
synced 2024-12-01 17:34:36 +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;
|
uint32_t jumpOffset;
|
||||||
uint64_t jumpBase;
|
uint64_t jumpBase;
|
||||||
const char* jumpName = nullptr;
|
const char* jumpName = nullptr;
|
||||||
|
const char* normalized = nullptr;
|
||||||
if( line.jumpAddr != 0 )
|
if( line.jumpAddr != 0 )
|
||||||
{
|
{
|
||||||
jumpOffset = 0;
|
jumpOffset = 0;
|
||||||
jumpBase = worker.GetSymbolForAddress( line.jumpAddr, jumpOffset );
|
jumpBase = worker.GetSymbolForAddress( line.jumpAddr, jumpOffset );
|
||||||
auto jumpSym = jumpBase == 0 ? worker.GetSymbolData( line.jumpAddr ) : worker.GetSymbolData( jumpBase );
|
auto jumpSym = jumpBase == 0 ? worker.GetSymbolData( line.jumpAddr ) : worker.GetSymbolData( jumpBase );
|
||||||
if( jumpSym ) jumpName = worker.GetString( jumpSym->name );
|
if( jumpSym ) jumpName = worker.GetString( jumpSym->name );
|
||||||
|
if( jumpName ) normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
@ -3938,7 +3940,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
TextDisabledUnformatted( "External target:" );
|
TextDisabledUnformatted( "External target:" );
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
ImGui::Text( "%s+%" PRIu32, normalized, jumpOffset );
|
||||||
if( jumpBase == m_baseAddr )
|
if( jumpBase == m_baseAddr )
|
||||||
{
|
{
|
||||||
uint32_t srcline;
|
uint32_t srcline;
|
||||||
@ -4077,7 +4079,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
TextDisabledUnformatted( "External target:" );
|
TextDisabledUnformatted( "External target:" );
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text( "%s+%" PRIu32, jumpName, jumpOffset );
|
ImGui::Text( "%s+%" PRIu32, normalized, jumpOffset );
|
||||||
if( jumpBase == m_baseAddr )
|
if( jumpBase == m_baseAddr )
|
||||||
{
|
{
|
||||||
uint32_t srcline;
|
uint32_t srcline;
|
||||||
@ -4239,7 +4241,6 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
|
|
||||||
if( jumpName )
|
if( jumpName )
|
||||||
{
|
{
|
||||||
const auto normalized = view.GetShortenName() != ShortenName::Never ? ShortenZoneName( ShortenName::OnlyNormalize, jumpName ) : jumpName;
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
Loading…
Reference in New Issue
Block a user