Separate asm lines selection.

This commit is contained in:
Bartosz Taudul 2020-04-08 23:59:10 +02:00
parent 25346c7a55
commit 08c58fe8e3
2 changed files with 8 additions and 2 deletions

View File

@ -1035,10 +1035,15 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip
void SourceView::SelectLine( uint32_t line, const Worker* worker, bool changeAsmLine, uint64_t targetAddr ) void SourceView::SelectLine( uint32_t line, const Worker* worker, bool changeAsmLine, uint64_t targetAddr )
{ {
m_selectedLine = line; m_selectedLine = line;
m_selectedAddresses.clear();
if( m_symAddr == 0 ) return; if( m_symAddr == 0 ) return;
assert( worker ); assert( worker );
auto addresses = worker->GetAddressesForLocation( m_fileStringIdx, line ); SelectAsmLines( m_fileStringIdx, line, *worker, changeAsmLine, targetAddr );
}
void SourceView::SelectAsmLines( uint32_t file, uint32_t line, const Worker& worker, bool changeAsmLine, uint64_t targetAddr )
{
m_selectedAddresses.clear();
auto addresses = worker.GetAddressesForLocation( file, line );
if( addresses ) if( addresses )
{ {
const auto& addr = *addresses; const auto& addr = *addresses;

View File

@ -67,6 +67,7 @@ private:
void RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t iptotal, const Worker& worker, uint64_t& jumpOut ); void RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t iptotal, const Worker& worker, uint64_t& jumpOut );
void SelectLine( uint32_t line, const Worker* worker, bool changeAsmLine = true, uint64_t targetAddr = 0 ); void SelectLine( uint32_t line, const Worker* worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
void SelectAsmLines( uint32_t file, uint32_t line, const Worker& worker, bool changeAsmLine = true, uint64_t targetAddr = 0 );
ImFont* m_font; ImFont* m_font;
const char* m_file; const char* m_file;