1
0
mirror of https://github.com/wolfpld/tracy synced 2025-05-02 13:43:52 +00:00

When selecting function in symbol view, go to function location.

This commit is contained in:
Bartosz Taudul 2020-07-19 23:43:52 +02:00
parent 402bfd3ba4
commit 6fe3736a23

View File

@ -1060,6 +1060,22 @@ void SourceView::RenderSymbolView( const Worker& worker, View& view )
if( ImGui::Selectable( symName, v.first == m_symAddr, ImGuiSelectableFlags_SpanAllColumns ) )
{
m_symAddr = v.first;
const auto sym = worker.GetSymbolData( v.first );
const char* file;
uint32_t line;
if( sym->isInline )
{
file = worker.GetString( sym->callFile );
line = sym->callLine;
}
else
{
file = worker.GetString( sym->file );
line = sym->line;
}
ParseSource( file, worker, view );
m_targetLine = line;
SelectLine( line, &worker, true );
}
ImGui::PopID();
ImGui::NextColumn();