mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-15 13:25:38 +00:00
Prefer switching to source/line within symbol in links from markdown.
This commit is contained in:
@@ -438,7 +438,7 @@ private:
|
||||
if( idx.Active() )
|
||||
{
|
||||
auto str = m_worker->GetString( idx );
|
||||
m_view->ViewSource( str, line );
|
||||
m_view->ViewSymbolSource( str, line );
|
||||
}
|
||||
}
|
||||
else if( isAnchor )
|
||||
|
||||
@@ -228,6 +228,19 @@ void View::ViewSourceCheckKeyMod( const char* fileName, int line, const char* fu
|
||||
}
|
||||
}
|
||||
|
||||
void View::ViewSymbolSource( const char* fileName, int line )
|
||||
{
|
||||
assert( fileName );
|
||||
if( m_sourceView->SwitchTo( fileName, line, m_worker, *this ) )
|
||||
{
|
||||
m_sourceViewFile = fileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewSource( fileName, line );
|
||||
}
|
||||
}
|
||||
|
||||
void View::ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr )
|
||||
{
|
||||
assert( fileName || symAddr );
|
||||
|
||||
@@ -135,6 +135,7 @@ public:
|
||||
void ViewSource( const char* fileName, int line );
|
||||
void ViewSource( const char* fileName, int line, const char* functionName );
|
||||
void ViewSourceCheckKeyMod( const char* fileName, int line, const char* functionName );
|
||||
void ViewSymbolSource( const char* fileName, int line );
|
||||
void ViewSymbol( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr );
|
||||
bool ViewDispatch( const char* fileName, int line, uint64_t symAddr );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user