mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Call stack window may now display frame addresses.
This commit is contained in:
parent
7df12652b1
commit
6ad184447a
@ -333,6 +333,7 @@ View::View( const char* addr, ImFont* fixedWidth, SetTitleCallback stcb )
|
||||
, m_onlyContendedLocks( true )
|
||||
, m_statSort( 0 )
|
||||
, m_statSelf( false )
|
||||
, m_showCallstackFrameAddress( false )
|
||||
, m_namespace( Namespace::Full )
|
||||
, m_textEditorFont( fixedWidth )
|
||||
, m_stcb( stcb )
|
||||
@ -378,6 +379,7 @@ View::View( FileRead& f, ImFont* fixedWidth, SetTitleCallback stcb )
|
||||
, m_onlyContendedLocks( true )
|
||||
, m_statSort( 0 )
|
||||
, m_statSelf( false )
|
||||
, m_showCallstackFrameAddress( false )
|
||||
, m_namespace( Namespace::Full )
|
||||
, m_textEditorFont( fixedWidth )
|
||||
, m_stcb( stcb )
|
||||
@ -6087,6 +6089,12 @@ void View::DrawCallstackWindow()
|
||||
bool show = true;
|
||||
ImGui::Begin( "Call stack", &show );
|
||||
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
ImGui::Checkbox( ICON_FA_AT " Show frame addresses", &m_showCallstackFrameAddress );
|
||||
#else
|
||||
ImGui::Checkbox( "Show frame addresses", &m_showCallstackFrameAddress );
|
||||
#endif
|
||||
|
||||
auto& cs = m_worker.GetCallstack( m_callstackInfoWindow );
|
||||
|
||||
ImGui::Columns( 3 );
|
||||
@ -6152,6 +6160,18 @@ void View::DrawCallstackWindow()
|
||||
ImGui::Indent( indentVal );
|
||||
}
|
||||
txt = m_worker.GetString( frame->file );
|
||||
if( m_showCallstackFrameAddress )
|
||||
{
|
||||
ImGui::TextDisabled( "0x%" PRIx64, entry );
|
||||
if( ImGui::IsItemClicked() )
|
||||
{
|
||||
char tmp[32];
|
||||
sprintf( tmp, "0x%" PRIx64, entry );
|
||||
ImGui::SetClipboardText( tmp );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( frame->line == 0 )
|
||||
{
|
||||
ImGui::TextDisabled( "%s", txt );
|
||||
@ -6164,6 +6184,7 @@ void View::DrawCallstackWindow()
|
||||
{
|
||||
ImGui::SetClipboardText( txt );
|
||||
}
|
||||
}
|
||||
if( ImGui::IsItemClicked( 1 ) )
|
||||
{
|
||||
if( FileExists( txt ) )
|
||||
|
@ -245,6 +245,7 @@ private:
|
||||
|
||||
int m_statSort;
|
||||
bool m_statSelf;
|
||||
bool m_showCallstackFrameAddress;
|
||||
|
||||
Namespace m_namespace;
|
||||
Animation m_zoomAnim;
|
||||
|
Loading…
Reference in New Issue
Block a user