mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 12:04:35 +00:00
Better callstack info window layout.
This commit is contained in:
parent
0d509ea3a6
commit
bc565e65d1
@ -4777,24 +4777,40 @@ void View::DrawCallstackWindow()
|
|||||||
|
|
||||||
auto& cs = m_worker.GetCallstack( m_callstackInfoWindow );
|
auto& cs = m_worker.GetCallstack( m_callstackInfoWindow );
|
||||||
|
|
||||||
|
ImGui::Columns( 3 );
|
||||||
|
ImGui::Text( "Frame" );
|
||||||
|
ImGui::NextColumn();
|
||||||
|
ImGui::Text( "Function" );
|
||||||
|
ImGui::NextColumn();
|
||||||
|
ImGui::Text( "Location" );
|
||||||
|
ImGui::NextColumn();
|
||||||
|
|
||||||
int fidx = 0;
|
int fidx = 0;
|
||||||
for( auto& entry : cs )
|
for( auto& entry : cs )
|
||||||
{
|
{
|
||||||
|
ImGui::Separator();
|
||||||
|
ImGui::Text( "%i", fidx++ );
|
||||||
|
ImGui::NextColumn();
|
||||||
|
|
||||||
auto frame = m_worker.GetCallstackFrame( entry );
|
auto frame = m_worker.GetCallstackFrame( entry );
|
||||||
if( !frame )
|
if( !frame )
|
||||||
{
|
{
|
||||||
ImGui::Text( "%i. 0x%" PRIX64, fidx++, entry );
|
ImGui::Text( "0x%" PRIX64, entry );
|
||||||
|
ImGui::NextColumn();
|
||||||
|
ImGui::NextColumn();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGui::Text( "%i. %s", fidx++, m_worker.GetString( frame->name ) );
|
ImGui::TextWrapped( "%s", m_worker.GetString( frame->name ) );
|
||||||
ImGui::SameLine();
|
ImGui::NextColumn();
|
||||||
ImGui::PushTextWrapPos( 0.0f );
|
ImGui::PushTextWrapPos( 0.0f );
|
||||||
ImGui::TextDisabled( "(%s:%i)", m_worker.GetString( frame->file ), frame->line );
|
ImGui::TextDisabled( "(%s:%i)", m_worker.GetString( frame->file ), frame->line );
|
||||||
ImGui::PopTextWrapPos();
|
ImGui::PopTextWrapPos();
|
||||||
|
ImGui::NextColumn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::EndColumns();
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
if( !show )
|
if( !show )
|
||||||
|
Loading…
Reference in New Issue
Block a user