From bfac1c73f09379ddb67b852aa7464a94d647b384 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 30 Oct 2015 12:30:22 +1300 Subject: [PATCH 1/5] Bitfield: Add .natvis for easier debugging in Visual Studio --- Source/Core/Common/BitField.natvis | 11 +++++++++++ Source/Core/Common/Common.vcxproj | 5 ++++- Source/Core/Common/Common.vcxproj.filters | 7 ++++++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 Source/Core/Common/BitField.natvis diff --git a/Source/Core/Common/BitField.natvis b/Source/Core/Common/BitField.natvis new file mode 100644 index 0000000000..5d09eeef0a --- /dev/null +++ b/Source/Core/Common/BitField.natvis @@ -0,0 +1,11 @@ + + + + {(storage & (1 << $T1)) != 0} + {(storage >> $T1) & ((1 << $T2) - 1)} + + $T1 + $T2 + + + \ No newline at end of file diff --git a/Source/Core/Common/Common.vcxproj b/Source/Core/Common/Common.vcxproj index 85a9a47eb7..f92679a1b6 100644 --- a/Source/Core/Common/Common.vcxproj +++ b/Source/Core/Common/Common.vcxproj @@ -187,7 +187,10 @@ {41279555-f94f-4ebc-99de-af863c10c5c4} + + + - + \ No newline at end of file diff --git a/Source/Core/Common/Common.vcxproj.filters b/Source/Core/Common/Common.vcxproj.filters index af926981f3..e708d237dd 100644 --- a/Source/Core/Common/Common.vcxproj.filters +++ b/Source/Core/Common/Common.vcxproj.filters @@ -189,6 +189,8 @@ GL\GLInterface + + @@ -253,4 +255,7 @@ - + + + + \ No newline at end of file From 9125ab8304a98fc42ded9024834cec6b86e845f3 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 30 Oct 2015 14:04:40 +1300 Subject: [PATCH 2/5] BitField: Clean .natvis up slightly by using CDATA. --- Source/Core/Common/BitField.natvis | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/BitField.natvis b/Source/Core/Common/BitField.natvis index 5d09eeef0a..963a82b667 100644 --- a/Source/Core/Common/BitField.natvis +++ b/Source/Core/Common/BitField.natvis @@ -1,8 +1,8 @@ - {(storage & (1 << $T1)) != 0} - {(storage >> $T1) & ((1 << $T2) - 1)} + + > $T1) & ((1 << $T2) - 1)}]]> $T1 $T2 From f0e5232fe054c05ef12ce6e185c9998c5c08cd85 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 30 Oct 2015 14:05:14 +1300 Subject: [PATCH 3/5] Bitfield: And then mess things up again by handling signed fields. This is way more messy than it should be. --- Source/Core/Common/BitField.natvis | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Source/Core/Common/BitField.natvis b/Source/Core/Common/BitField.natvis index 963a82b667..af1e41141b 100644 --- a/Source/Core/Common/BitField.natvis +++ b/Source/Core/Common/BitField.natvis @@ -8,4 +8,53 @@ $T2 + + + + + + + > $T1) & ((1 << ($T2-1)) - 1))}]]> + + > $T1) & ((1 << ($T2-1)) - 1)}]]> + + $T1 + $T2 + + + + + + + > $T1) & ((1 << ($T2-1)) - 1))}]]> + + > $T1) & ((1 << ($T2-1)) - 1)}]]> + + $T1 + $T2 + + + + + > $T1) & ((1 << ($T2-1)) - 1))}]]> + + > $T1) & ((1 << ($T2-1)) - 1)}]]> + + $T1 + $T2 + + + + + > $T1) & ((1 << ($T2-1)) - 1))}]]> + + > $T1) & ((1 << ($T2-1)) - 1)}]]> + + $T1 + $T2 + + \ No newline at end of file From 2ccd5a59281a79f93564ac3fe32fc91cca5a1329 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sun, 1 Nov 2015 18:01:51 +1300 Subject: [PATCH 4/5] Bitfield: Add BSD license to match BitField.h Also, fix typo. --- Source/Core/Common/BitField.natvis | 37 ++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/BitField.natvis b/Source/Core/Common/BitField.natvis index af1e41141b..44c0e8eab1 100644 --- a/Source/Core/Common/BitField.natvis +++ b/Source/Core/Common/BitField.natvis @@ -1,5 +1,38 @@ - + + + + > $T1) & ((1 << $T2) - 1)}]]> @@ -14,7 +47,7 @@ + bits to the smallest (most negative) number. --> > $T1) & ((1 << ($T2-1)) - 1))}]]> From 0245b1219bbe8e3aa90a7fea5675441795ae86fe Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 2 Nov 2015 17:12:09 +1300 Subject: [PATCH 5/5] Correct capitalization of 'Visual Studio' --- Source/Core/Common/BitField.natvis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/BitField.natvis b/Source/Core/Common/BitField.natvis index 44c0e8eab1..42141a3189 100644 --- a/Source/Core/Common/BitField.natvis +++ b/Source/Core/Common/BitField.natvis @@ -31,7 +31,7 @@