Skip to content

Commit

Permalink
Revert "STL.natvis: Simplify visualization for mutex/`recursive_m…
Browse files Browse the repository at this point in the history
…utex` (#3848)"

This reverts commit 9b4a05c.
  • Loading branch information
CaseyCarter committed Aug 30, 2023
1 parent dc550c4 commit d4249c2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -1584,11 +1584,15 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

<Type Name="std::mutex">
<AlternativeType Name="std::recursive_mutex"/>
<DisplayString Condition="_Mtx_storage._Count == 0">unlocked</DisplayString>
<DisplayString Condition="_Mtx_storage._Count != 0">locked</DisplayString>
<Expand>
<Item Name="[locking_thread_id]" Condition="_Mtx_storage._Count != 0">_Mtx_storage._Thread_id</Item>
<Item Name="[ownership_levels]" Condition="_Mtx_storage._Count != 0">_Mtx_storage._Count</Item>
<DisplayString Condition="sizeof(void *) == 4u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 44) == 0">unlocked</DisplayString>
<DisplayString Condition="sizeof(void *) == 4u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 44) != 0">locked</DisplayString>
<DisplayString Condition="sizeof(void *) == 8u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 76) == 0">unlocked</DisplayString>
<DisplayString Condition="sizeof(void *) == 8u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 76) != 0">locked</DisplayString>
<Expand>
<Item Name="[locking_thread_id]" Condition="sizeof(void *) == 4u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 44) != 0">*(long *)((char *)(&amp;_Mtx_storage) + 40)</Item>
<Item Name="[locking_thread_id]" Condition="sizeof(void *) == 8u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 76) != 0">*(long *)((char *)(&amp;_Mtx_storage) + 72)</Item>
<Item Name="[ownership_levels]" Condition="sizeof(void *) == 4u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 44) != 0">*(int *)((char *)(&amp;_Mtx_storage) + 44)</Item>
<Item Name="[ownership_levels]" Condition="sizeof(void *) == 8u &amp;&amp; *(int *)((char *)(&amp;_Mtx_storage) + 76) != 0">*(int *)((char *)(&amp;_Mtx_storage) + 76)</Item>
</Expand>
</Type>

Expand Down

0 comments on commit d4249c2

Please sign in to comment.