From 19e5fc490f7eb86c408ab8ca62103708a8553c8b Mon Sep 17 00:00:00 2001 From: Pavel P Date: Tue, 10 Dec 2024 03:23:53 +0200 Subject: [PATCH 1/4] `STL.natvis`: Simplify visualization for `string` It appears that debugger visualizer accepts `na` regardless if underlying char type --- stl/debugger/STL.natvis | 83 +++-------------------------------------- 1 file changed, 5 insertions(+), 78 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 94ec3470789..d9d4f13bfd9 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1005,13 +1005,11 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * wchar_t / unsigned short / char16_t = su format * char32_t = s32 format --> - - - + - - + + {_Mypair._Myval2._Bx._Buf,na} @@ -1030,85 +1028,14 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - - - - - - - - - - {_Mypair._Myval2._Bx._Buf,su} - {_Mypair._Myval2._Bx._Ptr,su} - _Mypair._Myval2._Bx._Buf,su - _Mypair._Myval2._Bx._Ptr,su - - size() - capacity() - _Mypair - - _Mypair._Myval2._Mysize - _Mypair._Myval2._Bx._Buf - _Mypair._Myval2._Bx._Ptr - - - - - - - - - - - - {_Mypair._Myval2._Bx._Buf,s32} - {_Mypair._Myval2._Bx._Ptr,s32} - _Mypair._Myval2._Bx._Buf,s32 - _Mypair._Myval2._Bx._Ptr,s32 - - size() - capacity() - _Mypair - - _Mypair._Myval2._Mysize - _Mypair._Myval2._Bx._Buf - _Mypair._Myval2._Bx._Ptr - - - - - - - - + + _Ptr,na _Ptr - - - - - - - _Ptr,su - - _Ptr - - - - - - _Ptr,s32 - - _Ptr - - - From 311646b30cc19c10f7f1570e064213df6b665177 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 10 Dec 2024 15:38:56 -0800 Subject: [PATCH 2/4] Update comments: explain `na`, drop `su` and `s32` --- stl/debugger/STL.natvis | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index d9d4f13bfd9..ad4b429acd9 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1001,9 +1001,8 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * Notes: * Hard coding _BUF_SIZE for clang-cl compatibility; clang-cl as of 7.0.1 does not emit S_CONSTANT to get _BUF_SIZE * - * char = na format - * wchar_t / unsigned short / char16_t = su format - * char32_t = s32 format + * The `na` format specifier means "no address". For more info, see: + * https://learn.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp?view=vs-2022 --> From 19352d681f1ae939d65337edb0cfe29b0515a213 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 10 Dec 2024 15:44:57 -0800 Subject: [PATCH 3/4] Simplify `_String_iterator`/`_String_const_iterator` wildcards. --- stl/debugger/STL.natvis | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index ad4b429acd9..f34f2cbc117 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1027,8 +1027,8 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - + + _Ptr,na _Ptr From a5e2a014589ec9650735c773c1638ddca1152070 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 10 Dec 2024 16:01:29 -0800 Subject: [PATCH 4/4] Simplify `basic_string` wildcards. --- stl/debugger/STL.natvis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index f34f2cbc117..bafbe36b877 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1004,7 +1004,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * The `na` format specifier means "no address". For more info, see: * https://learn.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp?view=vs-2022 --> - +