From 9ead36c42acbe296e131e95a749a529311c5b89e Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 22 Jun 2022 00:14:00 +0700 Subject: [PATCH 1/6] add a visializer for `_Ref_count_obj_alloc3` and `_Ref_count_obj2` --- stl/debugger/STL.natvis | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 68f97a945d..fb232abd95 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -400,6 +400,13 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + make_shared + + ($T1 *) &_Storage + + + allocate_shared @@ -418,6 +425,14 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + allocate_shared + + ($T1 *) &_Storage + *((_Mybase *) this) + + + custom deleter From 1cebd11b8466c69d9805c88a0fe80d42778e2c1e Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 22 Jun 2022 12:56:53 +0700 Subject: [PATCH 2/6] fix visualizer for stateful allocators --- stl/debugger/STL.natvis | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index fb232abd95..93102bc2ee 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -400,6 +400,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + make_shared @@ -425,11 +426,15 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + allocate_shared ($T1 *) &_Storage - *((_Mybase *) this) + + *((_Mybase *) this) + + _Myval From d1db4243fa018d2ba772a8694fe8de3791474bc7 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 22 Jun 2022 13:15:44 +0700 Subject: [PATCH 3/6] use Intrinsic --- stl/debugger/STL.natvis | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 93102bc2ee..75d29890f6 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -428,13 +428,14 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + + + allocate_shared ($T1 *) &_Storage - - *((_Mybase *) this) - - _Myval + allocator() From e00d14dd5cbfa78401c249a8eb13cd572136c0eb Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 22 Jun 2022 14:47:09 +0700 Subject: [PATCH 4/6] add a visualizer for _Ref_count_obj_alloc2 --- stl/debugger/STL.natvis | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 75d29890f6..e640703afa 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -426,8 +426,9 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - + + From 381e235e131cbaf18a81a67cc2a417a7c112015c Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 22 Jun 2022 19:10:47 -0700 Subject: [PATCH 5/6] Split comment for clarity. --- stl/debugger/STL.natvis | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index e640703afa..57357e44f8 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -426,7 +426,8 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - + + From 84a9095de7a38d21148f29b0970a0573e889d2a5 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Wed, 22 Jun 2022 23:49:22 -0700 Subject: [PATCH 6/6] Add indent to match the rest of our XML formatting. --- 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 57357e44f8..e70fe5e3b4 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -429,7 +429,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - +