Jump from assembly to source line.

This commit is contained in:
Bartosz Taudul 2020-04-02 00:53:27 +02:00
parent fe2dc8c489
commit 59a49f0698

View File

@ -505,9 +505,18 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip
{
if( m_font ) ImGui::PopFont();
ImGui::BeginTooltip();
ImGui::Text( "%s:%i", worker.GetString( idx ), srcline );
const auto fileName = worker.GetString( idx );
ImGui::Text( "%s:%i", fileName, srcline );
ImGui::EndTooltip();
if( m_font ) ImGui::PushFont( m_font );
if( !m_lines.empty() && m_file == fileName && ImGui::IsItemClicked() )
{
m_currentAddr = line.addr;
m_targetLine = srcline;
m_selectedLine = srcline;
m_showAsm = false;
}
}
}
ImGui::SameLine( 0, ty );