From 90217c67a3fc1f5254b68510bdfad1ea486703c2 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Thu, 2 Sep 2021 15:57:46 -0700 Subject: [PATCH 01/19] added mutex, timed_mutex, recursive_timed_mutex, lock_guard, unique_lock --- stl/debugger/STL.natvis | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 5885050d8d..61f437aa99 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1665,9 +1665,8 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - - + + unlocked locked unlocked @@ -1680,6 +1679,28 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + + {_My_mutex} + + *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 40) + *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 72) + *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 44) + *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 76) + _My_owner + + + + + {_My_mutex} + + + + {*_Pmtx} + + _Owns + + From 3ffa4e0cdc0bf8d4071548ea05d2ba59260456d2 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Tue, 7 Sep 2021 10:15:50 -0700 Subject: [PATCH 02/19] added scoped_lock defer_loc try_to_lock adopt_lock once_flag --- stl/debugger/STL.natvis | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 61f437aa99..00bed82aff 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1702,6 +1702,30 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + {_MyMutex} + + + + {_MyMutexes} + + + + defer lock + + + + try to lock + + + + adopt lock + + + + {(int)_Opaque} + + From 22c54cc53268d8ad723cad1056359588822f14b8 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Thu, 9 Sep 2021 12:56:57 -0700 Subject: [PATCH 03/19] adding also format --- stl/debugger/STL.natvis | 58 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 00bed82aff..6e2d5be550 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1666,7 +1666,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - + unlocked locked unlocked @@ -2000,4 +2000,60 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + {_Specs._Dynamic_width_index}, {_Specs._Dynamic_precision_index} + + _Specs._Dynamic_width_index + _Specs._Dynamic_precision_index + + + + + {_Format_string} + + _Num_args + _Next_arg_id + + + + + Num args:{_Num_args} + + _Index_array->_Index + _Index_array->_Type_ + + + + + Active state: {_Active_state} + + _No_state + _Int_state + _UInt_state + _Long_long_state + _ULong_long_state + _Bool_state + _Char_state + _Float_state + _Double_state + _Long_double_state + _Pointer_state + _CString_state + _String_state + _Custom_state + + + + + {_Args} + + _OutputIt + _Loc + + + + + {what()} + + From 405d9751ab4d623b898defe1911da218fdf8ace9 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Thu, 9 Sep 2021 15:47:04 -0700 Subject: [PATCH 04/19] fixed basic_format_arg --- stl/debugger/STL.natvis | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 6e2d5be550..0fa91a9209 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -2025,23 +2025,22 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - Active state: {_Active_state} - - _No_state - _Int_state - _UInt_state - _Long_long_state - _ULong_long_state - _Bool_state - _Char_state - _Float_state - _Double_state - _Long_double_state - _Pointer_state - _CString_state - _String_state - _Custom_state - + + No state: {_No_state} + Int state: {_Int_state} + UInt state: {_UInt_state} + Long long state: {_Long_long_state} + ULong long state: {_ULong_long_state} + Bool state: {_Bool_state} + Char state: {_Char_state} + Float state: {_Float_state} + Double state: {_Double_state} + Long double state: {_Long_double_state} + Pointer state: {_Pointer_state} + CString state: {_CString_state} + String state: {_String_state} + Custom state: {_Custom_state} + Active state: {_Active_state} From 4d056be6c184dd7aed6651b214ec846aa354c06d Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Thu, 9 Sep 2021 15:51:58 -0700 Subject: [PATCH 05/19] updated format error to exception --- stl/debugger/STL.natvis | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 0fa91a9209..9c4592777e 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -2025,7 +2025,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - No state: {_No_state} Int state: {_Int_state} UInt state: {_UInt_state} @@ -2051,7 +2050,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - + {what()} From ba479fcf22efebc8744c25d4510cffe9c75d2ba2 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Fri, 10 Sep 2021 11:50:51 -0700 Subject: [PATCH 06/19] modifing the timed versions --- stl/debugger/STL.natvis | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 9c4592777e..dfbc6dd16d 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1683,11 +1683,12 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception {_My_mutex} - *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 40) - *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 72) - *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 44) - *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 76) - _My_owner + *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 40) + *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 72) + *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 44) + *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 76) + _My_owner + _My_locked From 26a5ba1b06a270bb0cd73b73c7de6d143da09917 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Fri, 24 Sep 2021 13:20:14 -0700 Subject: [PATCH 07/19] added any visualizer --- stl/debugger/STL.natvis | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index dfbc6dd16d..8a0b6a2c39 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -2055,4 +2055,36 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception {what()} + + + + + + + + [empty] + [not empty (Small)] + [not empty (Large)] + + (void*)(&_Storage._TrivialData) + (void*)(&_Storage._SmallStorage._Data) + (void*)(_Storage._BigStorage._Ptr) + + {has_value()} + + + {type()} + + + (Small/Trivial Object) + + + (Small Object) + + + (Dynamic Allocation) + + + + From 33df139a8d2fbbdccc36722afc08dc87622dc578 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Thu, 14 Oct 2021 11:23:50 -0700 Subject: [PATCH 08/19] added ranged visualizers --- stl/debugger/STL.natvis | 48 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 8a0b6a2c39..e29320b9bb 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1932,6 +1932,32 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + {{ size={size()} }} + + empty() + front() + back() + data() + + + + + dangling + + + + {_Base} + + + + + {_Stream} + + _Val + + + &_Current,na @@ -1946,10 +1972,26 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - {*_Range} + + + + + + + + + + + + + + + {_Range} - *_Range + _Pred + _Count + _Fun + _Pattern From 1ab94b940b144b7fe8d6f7ddd072aa75f717d277 Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Mon, 22 Nov 2021 14:24:50 -0800 Subject: [PATCH 09/19] adding functional visualizers --- stl/debugger/STL.natvis | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index e29320b9bb..a884f05e3d 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -2097,6 +2097,16 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception {what()} + + {target_type().name()} + + + + + + {_Data} + + From b90542ac8b12963b4dd177f6b86ad4c48736458b Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Tue, 30 Nov 2021 15:22:05 -0800 Subject: [PATCH 10/19] making basic_format_args show its content --- stl/debugger/STL.natvis | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index a884f05e3d..0318f8bcb7 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -2062,8 +2062,47 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception Num args:{_Num_args} - _Index_array->_Index _Index_array->_Type_ + + _Num_args + + *(reinterpret_cast<const int*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const unsigned int*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const long long*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const unsigned long long*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const bool*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const float*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const double*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const long double*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + (void*)(*(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index)) + + + *(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + + *(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + + reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index + From 10204ef78833adb82ff64d3b8886c251adcba48c Mon Sep 17 00:00:00 2001 From: Anju Del Moral Gonzalez Date: Thu, 2 Dec 2021 09:38:37 -0800 Subject: [PATCH 11/19] basic_format_args --- stl/debugger/STL.natvis | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 0318f8bcb7..d3551fd572 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -2046,8 +2046,18 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception {_Specs._Dynamic_width_index}, {_Specs._Dynamic_precision_index} - _Specs._Dynamic_width_index - _Specs._Dynamic_precision_index + _Specs._Dynamic_width_index + _Specs._Dynamic_precision_index + _Specs._Width + _Specs._Precision + _Specs._Type + _Specs._Alignment + _Specs._Sgn + _Specs._Alt + _Specs._Localized + _Specs._Leading_zero + _Specs._Fill_length + _Specs._Fill @@ -2096,10 +2106,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception (void*)(*(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index)) - *(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + reinterpret_cast<char*>(*((reinterpret_cast<const long long *>(_Index_array + _Num_args) + _Index_array[$i]._Index)+0)) - *(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + reinterpret_cast<char*>(*((reinterpret_cast<const long long *>(_Index_array + _Num_args) + _Index_array[$i]._Index)+0)) reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index From e2efbebecc4fe016db86a2b01026c9646123694b Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Fri, 1 Jul 2022 15:39:57 -0700 Subject: [PATCH 12/19] wip --- stl/debugger/STL.natvis | 138 ++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 3a6bb13d0d..a9c84b4e43 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -51,76 +51,63 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - ({*this,view(noparens)}) - + + + ({*this,view(noparens)}) + - {_Myfirst._Val} - ({*this,view(noparens)}) - - _Myfirst._Val - + {_Myfirst._Val} + {&_Myfirst._Val} + ({*this,view(noparensasptr)}) + ({*this,view(noparens)}) + + _Myfirst._Val + - {_Myfirst._Val}, {((_Mybase *) this)->_Myfirst._Val} - ({*this,view(noparens)}) - - _Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val - - - - - {_Myfirst._Val}, {((_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase *) this)->_Myfirst._Val} - ({*this,view(noparens)}) - - _Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase *) this)->_Myfirst._Val - - - - - {_Myfirst._Val}, {((_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val} - ({*this,view(noparens)}) - - _Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - - - - - {_Myfirst._Val}, {((_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val} - ({*this,view(noparens)}) - - _Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - + {_Myfirst._Val}, {*((_Mybase *) this),view(noparens)} + {&_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} + ({*this,view(noparensasptr)}) + ({*this,view(noparens)}) + + _Myfirst._Val + &_Myfirst._Val + ((_Mybase *) this)->_Myfirst._Val + &((_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + - {_Myfirst._Val}, {((_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val}, {((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val}, {*((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this),view(noparens)} - ({*this,view(noparens)}) - - _Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - Next five elements: - *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this) - + {_Myfirst._Val}, {*((_Mybase *) this),view(noparens)} + {&_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} + ({*this,view(noparensasptr)}) + ({*this,view(noparens)}) + + _Myfirst._Val + &_Myfirst._Val + ((_Mybase *) this)->_Myfirst._Val + &((_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + Next five elements: + *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this) + *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this),view(asptr) + - nullopt @@ -1577,34 +1564,47 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - {_My_mutex} + unlocked + locked - *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 40) - *(long *)((char *)(&(_My_mutex._Mtx_storage)) + 72) - *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 44) - *(int *)((char *)(&(_My_mutex._Mtx_storage)) + 76) _My_owner - _My_locked + _My_locked - {_My_mutex} + {&_MyMutex} + + &_MyMutex + - {*_Pmtx} + empty + {*_Pmtx} - unowned + {*_Pmtx} - owned - _Owns + _Pmtx + _Owns + + () + + - {_MyMutex} + ({&_MyMutex}) + + &_MyMutex + {_MyMutexes} + + _MyMutexes + From c624cc7e25f27a30756bdc9658f53c402dcaf2db Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Fri, 1 Jul 2022 17:01:02 -0700 Subject: [PATCH 13/19] wip - should be done with most of the lock guards --- stl/debugger/STL.natvis | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index a9c84b4e43..400bcae1b3 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -52,7 +52,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - + ({*this,view(noparens)}) @@ -79,15 +79,15 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception &((_Mybase *) this)->_Myfirst._Val ((_Mybase::_Mybase *) this)->_Myfirst._Val &((_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val &((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - {_Myfirst._Val}, {*((_Mybase *) this),view(noparens)} + {_Myfirst._Val}, {*((_Mybase *) this)} {&_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} ({*this,view(noparensasptr)}) ({*this,view(noparens)}) @@ -103,6 +103,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val Next five elements: + *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this) *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this),view(asptr) @@ -1601,9 +1602,9 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - {_MyMutexes} + {_MyMutexes,view(asptr)} - _MyMutexes + _MyMutexes,view(asptr) From 5762b98169b6909721de1918ef181ad6a8c812f6 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 5 Jul 2022 14:24:13 -0700 Subject: [PATCH 14/19] finish up Nicole changes TODO: figure out if the format_args stuff can be fixed --- stl/debugger/STL.natvis | 199 ++++++++++++++++------------------------ 1 file changed, 81 insertions(+), 118 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 400bcae1b3..3e10d6acf4 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -51,8 +51,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - + ({*this,view(noparens)}) @@ -63,49 +62,42 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ({*this,view(noparensasptr)}) ({*this,view(noparens)}) - _Myfirst._Val + _Myfirst._Val + &_Myfirst._Val {_Myfirst._Val}, {*((_Mybase *) this),view(noparens)} - {&_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} - ({*this,view(noparensasptr)}) ({*this,view(noparens)}) - _Myfirst._Val - &_Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val - &((_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase *) this)->_Myfirst._Val - &((_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - &((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + _Myfirst._Val + ((_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + + + Next five elements: + + *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this) - - {_Myfirst._Val}, {*((_Mybase *) this)} + {&_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} - ({*this,view(noparensasptr)}) - ({*this,view(noparens)}) + ({*this,view(noparensasptr)}) - _Myfirst._Val - &_Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val - &((_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase *) this)->_Myfirst._Val - &((_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - &((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - Next five elements: - - *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this) - *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this),view(asptr) + &_Myfirst._Val + &((_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val + + + Next five elements: + + *((_Mybase::_Mybase::_Mybase::_Mybase::_Mybase *) this),view(asptr) @@ -204,37 +196,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception monostate - - - - - - - - - [empty] - [not empty (Small)] - [not empty (Large)] - - - {has_value()} - - - {type()} - - - (Small/Trivial Object) - - - (Small Object) - - - (Dynamic Allocation) - - - - - {unex()} @@ -1609,19 +1570,20 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - defer lock + std::defer_lock - try to lock + std::try_to_lock - adopt lock + std::adopt_lock - {(int)_Opaque} + incomplete + complete @@ -1847,11 +1809,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception {_Base} - - + {_Stream} - _Val + _Val @@ -1878,17 +1839,18 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - + + {_Range} - _Pred - _Count - _Fun - _Pattern + _Pred + _Next + _Count + _Fun + _Pattern @@ -1940,24 +1902,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - {_Specs._Dynamic_width_index}, {_Specs._Dynamic_precision_index} - - _Specs._Dynamic_width_index - _Specs._Dynamic_precision_index - _Specs._Width - _Specs._Precision - _Specs._Type - _Specs._Alignment - _Specs._Sgn - _Specs._Alt - _Specs._Localized - _Specs._Leading_zero - _Specs._Fill_length - _Specs._Fill - - - {_Format_string} @@ -1967,48 +1911,70 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - Num args:{_Num_args} + + + {{ size={_Num_args} }} - _Index_array->_Type_ _Num_args + "None" + - *(reinterpret_cast<const int*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(int*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const unsigned int*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(unsigned int*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const long long*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(long long*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const unsigned long long*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(unsigned long long*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const bool*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(bool*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(char*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const float*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(float*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const double*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(double*)(&storage()[_Index_array[$i]._Index]) + - *(reinterpret_cast<const long double*>(_Index_array + _Num_args) + _Index_array[$i]._Index) + *(long double*)(&storage()[_Index_array[$i]._Index]) + - (void*)(*(reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index)) + *(void**)(&storage()[_Index_array[$i]._Index]) + + - reinterpret_cast<char*>(*((reinterpret_cast<const long long *>(_Index_array + _Num_args) + _Index_array[$i]._Index)+0)) + *(char**)(&storage()[_Index_array[$i]._Index]) + - reinterpret_cast<char*>(*((reinterpret_cast<const long long *>(_Index_array + _Num_args) + _Index_array[$i]._Index)+0)) + *(std::string_view*)(&storage()[_Index_array[$i]._Index]) + + + + *(void**)(&storage()[_Index_array[$i]._Index]) - reinterpret_cast<const unsigned char*>(_Index_array + _Num_args) + _Index_array[$i]._Index @@ -2043,10 +2009,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception {what()} - - {target_type().name()} - - @@ -2061,12 +2023,13 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [empty] - [not empty (Small)] - [not empty (Large)] + [not empty (trivial)] + [not empty (small)] + [not empty (large)] (void*)(&_Storage._TrivialData) (void*)(&_Storage._SmallStorage._Data) - (void*)(_Storage._BigStorage._Ptr) + _Storage._BigStorage._Ptr {has_value()} @@ -2074,7 +2037,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception {type()} - (Small/Trivial Object) + (Small and Trivial Object) (Small Object) From 3fde3a59d4a0b623f9cd566a8b3e42c8211c3b29 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 5 Jul 2022 14:38:15 -0700 Subject: [PATCH 15/19] _Active_state > 14 is invalid --- 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 3e10d6acf4..0c9ee8a65a 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1994,7 +1994,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception CString state: {_CString_state} String state: {_String_state} Custom state: {_Custom_state} - Active state: {_Active_state} + Invalid state: {_Active_state} From a3bcac3a68f17cb2fa987676c5e4efc832885585 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 5 Jul 2022 16:05:17 -0700 Subject: [PATCH 16/19] specialize for each basic_format_args --- stl/debugger/STL.natvis | 71 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 0c9ee8a65a..619b13e984 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -1910,8 +1910,10 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - + + + + {{ size={_Num_args} }} @@ -1979,6 +1981,71 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + + + + + {{ size={_Num_args} }} + + + _Num_args + + + *(int*)(&storage()[_Index_array[$i]._Index]) + + + + *(unsigned int*)(&storage()[_Index_array[$i]._Index]) + + + + *(long long*)(&storage()[_Index_array[$i]._Index]) + + + + *(unsigned long long*)(&storage()[_Index_array[$i]._Index]) + + + + *(bool*)(&storage()[_Index_array[$i]._Index]) + + + + *(char*)(&storage()[_Index_array[$i]._Index]) + + + + *(float*)(&storage()[_Index_array[$i]._Index]) + + + + *(double*)(&storage()[_Index_array[$i]._Index]) + + + + *(long double*)(&storage()[_Index_array[$i]._Index]) + + + + *(void**)(&storage()[_Index_array[$i]._Index]) + + + + *(wchar_t**)(&storage()[_Index_array[$i]._Index]) + + + + *(std::wstring_view*)(&storage()[_Index_array[$i]._Index]) + + + + *(void**)(&storage()[_Index_array[$i]._Index]) + + + + + No state: {_No_state} Int state: {_Int_state} From 0fca0092aaa320e030ac97c7460a64757eb1691f Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 5 Jul 2022 16:18:13 -0700 Subject: [PATCH 17/19] simplify further --- stl/debugger/STL.natvis | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index 619b13e984..834eac9d9d 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -49,34 +49,30 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - ({*this,view(noparens)}) + + + + {_Myfirst._Val}, {*((_Mybase *) this),view(noparens)} + {_Myfirst._Val} - {&_Myfirst._Val} - ({*this,view(noparensasptr)}) - ({*this,view(noparens)}) - - _Myfirst._Val - &_Myfirst._Val - - - - - {_Myfirst._Val}, {*((_Mybase *) this),view(noparens)} ({*this,view(noparens)}) _Myfirst._Val - ((_Mybase *) this)->_Myfirst._Val + ((_Mybase *) this)->_Myfirst._Val ((_Mybase::_Mybase *) this)->_Myfirst._Val ((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val ((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - Next five elements: @@ -84,8 +80,11 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - {&_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} + + + {_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} + + {&_Myfirst._Val} ({*this,view(noparensasptr)}) &_Myfirst._Val @@ -93,7 +92,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception &((_Mybase::_Mybase *) this)->_Myfirst._Val &((_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val &((_Mybase::_Mybase::_Mybase::_Mybase *) this)->_Myfirst._Val - Next five elements: From e98401c089a9b11e0d2e943cfbef08281c883198 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 5 Jul 2022 16:20:22 -0700 Subject: [PATCH 18/19] swap optional and condition to be consistent --- 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 834eac9d9d..ac2890e58a 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -62,7 +62,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception --> - + {_Myfirst._Val}, {*((_Mybase *) this),view(noparens)} {_Myfirst._Val} @@ -81,7 +81,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - + {_Myfirst._Val}, {*((_Mybase *) this),view(noparensasptr)} {&_Myfirst._Val} From f99f7376b1a0dbed99164eb8be6ba3108ee0bade Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Tue, 5 Jul 2022 18:20:51 -0700 Subject: [PATCH 19/19] STL comments --- stl/debugger/STL.natvis | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index ac2890e58a..1626bcb87c 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -56,7 +56,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -1958,11 +1958,6 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *(void**)(&storage()[_Index_array[$i]._Index]) - *(char**)(&storage()[_Index_array[$i]._Index]) @@ -1981,7 +1976,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - + {{ size={_Num_args} }} @@ -2010,7 +2005,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - *(char*)(&storage()[_Index_array[$i]._Index]) + *(wchar_t*)(&storage()[_Index_array[$i]._Index])