Show which symbols are available.

This commit is contained in:
Bartosz Taudul 2020-08-13 16:24:09 +02:00
parent 16ad6ee2ac
commit b6feb99e98
3 changed files with 11 additions and 0 deletions

View File

@ -12479,6 +12479,11 @@ void View::DrawStatistics()
ImGui::NextColumn();
if( symlen != 0 )
{
if( m_worker.HasSymbolCode( codeAddr ) )
{
TextDisabledUnformatted( ICON_FA_DATABASE );
ImGui::SameLine();
}
if( isInline )
{
TextDisabledUnformatted( "<" );

View File

@ -2080,6 +2080,11 @@ const SymbolData* Worker::GetSymbolData( uint64_t sym ) const
}
}
bool Worker::HasSymbolCode( uint64_t sym ) const
{
return m_data.symbolCode.find( sym ) != m_data.symbolCode.end();
}
const char* Worker::GetSymbolCode( uint64_t sym, uint32_t& len ) const
{
auto it = m_data.symbolCode.find( sym );

View File

@ -493,6 +493,7 @@ public:
CallstackFrameId PackPointer( uint64_t ptr ) const;
uint64_t GetCanonicalPointer( const CallstackFrameId& id ) const;
const SymbolData* GetSymbolData( uint64_t sym ) const;
bool HasSymbolCode( uint64_t sym ) const;
const char* GetSymbolCode( uint64_t sym, uint32_t& len ) const;
uint64_t GetSymbolForAddress( uint64_t address ) const;
uint64_t GetSymbolForAddress( uint64_t address, uint32_t& offset ) const;