Display local call stack for assembly lines.

This commit is contained in:
Bartosz Taudul 2022-10-12 00:45:05 +02:00
parent c041b962c0
commit 70dd37bbea
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3769,6 +3769,20 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
UnsetFont(); UnsetFont();
} }
} }
const auto frame = worker.GetCallstackFrame( worker.PackPointer( line.addr ) );
if( frame && frame->size > 1 )
{
ImGui::Separator();
TextDisabledUnformatted( "Local call stack:" );
for( uint8_t i=0; i<frame->size; i++ )
{
ImGui::TextDisabled( "%i.", i+1 );
ImGui::SameLine();
ImGui::Text( "%s", worker.GetString( frame->data[i].name ) );
ImGui::SameLine();
ImGui::TextDisabled( "%s:%i", worker.GetString( frame->data[i].file ), frame->data[i].line );
}
}
ImGui::EndTooltip(); ImGui::EndTooltip();
SetFont(); SetFont();
if( ImGui::IsItemClicked( 0 ) || ImGui::IsItemClicked( 1 ) ) if( ImGui::IsItemClicked( 0 ) || ImGui::IsItemClicked( 1 ) )