From 2a66487d2abb7f7f706509b0cf8da0f129fccda5 Mon Sep 17 00:00:00 2001 From: Anju del Moral Gonzalez Date: Mon, 11 Jul 2022 16:27:04 -0700 Subject: [PATCH] Adding mutex, ranges, functional, any and format visualizers (#2191) Co-authored-by: nicole mazzuca --- stl/debugger/STL.natvis | 459 +++++++++++++++++++++++++++++++--------- 1 file changed, 358 insertions(+), 101 deletions(-) diff --git a/stl/debugger/STL.natvis b/stl/debugger/STL.natvis index ef806a198e3..a0ddeb5e2d4 100644 --- a/stl/debugger/STL.natvis +++ b/stl/debugger/STL.natvis @@ -49,78 +49,56 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - - ({*this,view(noparens)}) - - - - - {_Myfirst._Val} - ({*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 - + + ({*this,view(noparens)}) + - - {_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} + ({*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)->_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(noparensasptr)} + + {&_Myfirst._Val} + ({*this,view(noparensasptr)}) + + &_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) + - nullopt @@ -216,37 +194,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()} @@ -1600,9 +1547,8 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - - + + unlocked locked unlocked @@ -1615,6 +1561,67 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + + unlocked + locked + + _My_owner + _My_locked + + + + + {&_MyMutex} + + &_MyMutex + + + + + empty + {*_Pmtx} - unowned + {*_Pmtx} - owned + + _Pmtx + _Owns + + + + + () + + + + ({&_MyMutex}) + + &_MyMutex + + + + + {_MyMutexes,view(asptr)} + + _MyMutexes,view(asptr) + + + + + std::defer_lock + + + + std::try_to_lock + + + + std::adopt_lock + + + + incomplete + complete + @@ -1821,6 +1828,31 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + {{ size={size()} }} + + empty() + front() + back() + data() + + + + + dangling + + + + {_Base} + + + + {_Stream} + + _Val + + + &_Current,na @@ -1835,10 +1867,27 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - - {*_Range} + + + + + + + + + + + + + + + {_Range} - *_Range + _Pred + _Next + _Count + _Fun + _Pattern @@ -1890,4 +1939,212 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + + {_Format_string} + + _Num_args + _Next_arg_id + + + + + + + + + {{ size={_Num_args} }} + + + _Num_args + "None" + + + *(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]) + + + + *(char**)(&storage()[_Index_array[$i]._Index]) + + + + *(std::string_view*)(&storage()[_Index_array[$i]._Index]) + + + + *(void**)(&storage()[_Index_array[$i]._Index]) + + + + + + + + + + + {{ 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]) + + + + *(wchar_t*)(&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} + 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} + Invalid state: {_Active_state} + + + + {_Args} + + _OutputIt + _Loc + + + + + {what()} + + + + + + {_Data} + + + + + + + + + + [empty] + [not empty (trivial)] + [not empty (small)] + [not empty (large)] + + (void*)(&_Storage._TrivialData) + (void*)(&_Storage._SmallStorage._Data) + _Storage._BigStorage._Ptr + + {has_value()} + + + {type()} + + + (Small and Trivial Object) + + + (Small Object) + + + (Dynamic Allocation) + + + +