From 4cf096d883266092d325bcf5371bbf857bc4b88c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 17 Sep 2022 23:06:16 +0200 Subject: Mark privileged instructions in the tooltip. --- server/TracySourceView.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'server/TracySourceView.cpp') diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 829e6662..83b71e79 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -3960,7 +3960,21 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr ImGui::BeginTooltip(); 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( jumpBase == m_baseAddr ) -- cgit v1.2.3