mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-05 18:23:39 -04:00
common: Add NATVIS to BitField class for better VS debugging (#1731)
This commit is contained in:
parent
3e27010c7b
commit
91abe7f7d0
2 changed files with 29 additions and 0 deletions
|
|
@ -68,6 +68,7 @@ add_library(citra_common STATIC
|
|||
detached_tasks.cpp
|
||||
detached_tasks.h
|
||||
bit_field.h
|
||||
bit_field.natvis
|
||||
bit_set.h
|
||||
bounded_threadsafe_queue.h
|
||||
cityhash.cpp
|
||||
|
|
|
|||
28
src/common/bit_field.natvis
Normal file
28
src/common/bit_field.natvis
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright Citra Emulator Project / Azahar Emulator Project -->
|
||||
<!-- Licensed under GPLv2 or any later version -->
|
||||
<!-- Refer to the license.txt file included. -->
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="BitField<*,*,*,*>">
|
||||
<DisplayString>
|
||||
{((unsigned long long)storage >> $T1) & (((unsigned long long)1 << $T2) - 1)}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="UnsignedValue">
|
||||
((unsigned long long)storage >> $T1) & (((unsigned long long)1 << $T2) - 1)
|
||||
</Item>
|
||||
<Item Name="SignedValue">
|
||||
(long long)((((unsigned long long)storage >> $T1) & ((1ULL << $T2)-1)) & (1ULL << ($T2-1))
|
||||
? -((1ULL << $T2) - (((unsigned long long)storage >> $T1) & ((1ULL << $T2)-1)))
|
||||
: (((unsigned long long)storage >> $T1) & ((1ULL << $T2)-1)))
|
||||
</Item>
|
||||
<Item Name="Position">
|
||||
$T1
|
||||
</Item>
|
||||
<Item Name="Bits">
|
||||
$T2
|
||||
</Item>
|
||||
<Item Name="RawStorage">storage</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
||||
Loading…
Add table
Reference in a new issue