Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2021-12-24 05:19:13 +0300
committerBartosz Taudul <wolf@nereid.pl>2021-12-24 05:19:13 +0300
commit81de0a3a7584bacbdb68e9b81eb2a97d55a18c25 (patch)
tree8f09ea46b9cec65ea9ff7c5b0415c7ba5bef682c
parentdc2ac4e4b340ccd7a932591978d1efd64782dbd2 (diff)
Display source location of symbol functions.
-rw-r--r--server/TracySourceView.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp
index 8a5a06d3..d4aeb6b5 100644
--- a/server/TracySourceView.cpp
+++ b/server/TracySourceView.cpp
@@ -1167,30 +1167,33 @@ void SourceView::RenderSymbolView( Worker& worker, View& view )
}
auto isym = worker.GetSymbolData( v.first );
assert( isym );
+ const char* file;
+ uint32_t line;
+ if( isym->isInline )
+ {
+ file = worker.GetString( isym->callFile );
+ line = isym->callLine;
+ }
+ else
+ {
+ file = worker.GetString( isym->file );
+ line = isym->line;
+ }
ImGui::PushID( v.first );
const auto symName = v.first == m_baseAddr ? "[ - self - ]" : worker.GetString( isym->name );
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 );
SelectViewMode();
}
ImGui::PopID();
+ ImGui::SameLine();
+ ImGui::Spacing();
+ ImGui::SameLine();
+ ImGui::TextDisabled( "%s:%i", file, line );
ImGui::NextColumn();
ImGui::TextDisabled( "0x%" PRIx64, v.first );
ImGui::NextColumn();