Mark privileged instructions in the tooltip.

This commit is contained in:
Bartosz Taudul 2022-09-17 23:06:16 +02:00
parent 4c086e94e4
commit 4cf096d883
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3960,7 +3960,21 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
ImGui::BeginTooltip(); ImGui::BeginTooltip();
if( jumpName || opdesc != 0 ) if( jumpName || opdesc != 0 )
{ {
if( opdesc != 0 ) ImGui::TextUnformatted( OpDescList[opdesc] ); if( opdesc != 0 )
{
ImGui::TextUnformatted( OpDescList[opdesc] );
if( line.opType == OpType::Privileged )
{
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
TextColoredUnformatted( AsmOpTypeColors[(int)OpType::Privileged], "privileged" );
}
}
else if( line.opType == OpType::Privileged )
{
TextColoredUnformatted( AsmOpTypeColors[(int)OpType::Privileged], "Privileged" );
}
if( jumpName ) if( jumpName )
{ {
if( jumpBase == m_baseAddr ) if( jumpBase == m_baseAddr )