Better symbol information.

This commit is contained in:
Bartosz Taudul 2020-02-29 19:28:42 +01:00
parent 452d571e79
commit de3a48f958

View File

@ -13325,13 +13325,39 @@ void View::DrawSampleParents()
ImGui::PopFont(); ImGui::PopFont();
TextDisabledUnformatted( "Location:" ); TextDisabledUnformatted( "Location:" );
ImGui::SameLine(); ImGui::SameLine();
const auto callFile = m_worker.GetString( symbol->callFile );
if( symbol->callLine > 0 ) if( symbol->callLine > 0 )
{ {
ImGui::Text( "%s:%i", m_worker.GetString( symbol->file ), symbol->line ); ImGui::Text( "%s:%i", callFile, symbol->callLine );
} }
else else
{ {
ImGui::TextUnformatted( m_worker.GetString( symbol->file ) ); ImGui::TextUnformatted( callFile );
}
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( callFile, m_worker.GetCaptureTime() ) )
{
SetTextEditorFile( callFile, symbol->callLine );
}
}
TextDisabledUnformatted( "Entry point:" );
ImGui::SameLine();
const auto file = m_worker.GetString( symbol->file );
if( symbol->line > 0 )
{
ImGui::Text( "%s:%i", file, symbol->line );
}
else
{
ImGui::TextUnformatted( file );
}
if( ImGui::IsItemClicked( 1 ) )
{
if( SourceFileValid( file, m_worker.GetCaptureTime() ) )
{
SetTextEditorFile( file, symbol->line );
}
} }
ImGui::SameLine(); ImGui::SameLine();
ImGui::Spacing(); ImGui::Spacing();