mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Check for asm/source availability in SetTextEditorFile.
This commit is contained in:
parent
efbf13fcd4
commit
78ea40d70c
@ -199,11 +199,28 @@ void View::SetTextEditorFile( const char* fileName, int line, uint64_t baseAddr,
|
||||
m_sourceView->Open( fileName, line, baseAddr, symAddr, m_worker );
|
||||
}
|
||||
|
||||
void View::SetTextEditorFile( const char* fileName, int line, uint64_t symAddr )
|
||||
bool View::SetTextEditorFile( const char* fileName, int line, uint64_t symAddr )
|
||||
{
|
||||
if( line == 0 )
|
||||
{
|
||||
fileName = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !SourceFileValid( fileName, m_worker.GetCaptureTime() ) )
|
||||
{
|
||||
fileName = nullptr;
|
||||
line = 0;
|
||||
}
|
||||
}
|
||||
if( symAddr == 0 )
|
||||
{
|
||||
SetTextEditorFile( fileName, line, 0, 0 );
|
||||
if( line != 0 )
|
||||
{
|
||||
SetTextEditorFile( fileName, line, 0, 0 );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -222,7 +239,12 @@ void View::SetTextEditorFile( const char* fileName, int line, uint64_t symAddr )
|
||||
if( pit != symMap.end() ) baseAddr = parentAddr;
|
||||
}
|
||||
}
|
||||
SetTextEditorFile( fileName, line, baseAddr, symAddr );
|
||||
if( symlen != 0 || line != 0 )
|
||||
{
|
||||
SetTextEditorFile( fileName, line, baseAddr, symAddr );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
|
||||
void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; }
|
||||
void SetTextEditorFile( const char* fileName, int line, uint64_t baseAddr, uint64_t symAddr );
|
||||
void SetTextEditorFile( const char* fileName, int line, uint64_t symAddr );
|
||||
bool SetTextEditorFile( const char* fileName, int line, uint64_t symAddr );
|
||||
|
||||
bool ReconnectRequested() const { return m_reconnectRequested; }
|
||||
std::string GetAddress() const { return m_worker.GetAddr(); }
|
||||
|
Loading…
Reference in New Issue
Block a user