mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add ability to right click and jump to assembly location in symbol view from source
This commit is contained in:
parent
f0386d2f72
commit
7365dea255
@ -3293,7 +3293,10 @@ void SourceView::RenderLine( const Tokenizer::Line& line, int lineNum, const Add
|
||||
if( !mouseHandled && ( ImGui::IsMouseClicked( 0 ) || ImGui::IsMouseClicked( 1 ) ) )
|
||||
{
|
||||
m_displayMode = DisplayMixed;
|
||||
SelectLine( lineNum, worker, ImGui::IsMouseClicked( 1 ) );
|
||||
auto targetAddresses = worker->GetAddressesForLocation( m_source.idx(), lineNum );
|
||||
auto hasTarget = targetAddresses && !targetAddresses->empty();
|
||||
auto midAddress = hasTarget ? targetAddresses->operator[]( targetAddresses->size() / 2 ) : 0;
|
||||
SelectLine( lineNum, worker, ImGui::IsMouseClicked( 1 ), midAddress );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user