From 77234b514cb81f5648920d2bb48e6c8c0a496cec Mon Sep 17 00:00:00 2001 From: Agustin Berge Date: Sat, 23 Mar 2024 16:04:54 -0300 Subject: [PATCH] Improve natvis: - extend support from 10 to 40 alternatives, - split single-buffer vs double-buffer definitions, - adjust display string to follow MS definition for std::variant --- extra/boost_variant2.natvis | 200 +++++++++++++++++++++++++++++++----- 1 file changed, 173 insertions(+), 27 deletions(-) diff --git a/extra/boost_variant2.natvis b/extra/boost_variant2.natvis index 8f8cab4..a8c29b8 100644 --- a/extra/boost_variant2.natvis +++ b/extra/boost_variant2.natvis @@ -1,32 +1,178 @@ - - - {st_.rest_.first_} ({index()}) - {st_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) - - index() - ix_ - - + + + {{ index=0, value={*($T2*)&st_} }} + {{ index=1, value={*($T3*)&st_} }} + {{ index=2, value={*($T4*)&st_} }} + {{ index=3, value={*($T5*)&st_} }} + {{ index=4, value={*($T6*)&st_} }} + {{ index=5, value={*($T7*)&st_} }} + {{ index=6, value={*($T8*)&st_} }} + {{ index=7, value={*($T9*)&st_} }} + {{ index=8, value={*($T10*)&st_} }} + {{ index=9, value={*($T11*)&st_} }} + {{ index=10, value={*($T12*)&st_} }} + {{ index=11, value={*($T13*)&st_} }} + {{ index=12, value={*($T14*)&st_} }} + {{ index=13, value={*($T15*)&st_} }} + {{ index=14, value={*($T16*)&st_} }} + {{ index=15, value={*($T17*)&st_} }} + {{ index=16, value={*($T18*)&st_} }} + {{ index=17, value={*($T19*)&st_} }} + {{ index=18, value={*($T20*)&st_} }} + {{ index=19, value={*($T21*)&st_} }} + {{ index=10, value={*($T22*)&st_} }} + {{ index=21, value={*($T23*)&st_} }} + {{ index=22, value={*($T24*)&st_} }} + {{ index=23, value={*($T25*)&st_} }} + {{ index=24, value={*($T26*)&st_} }} + {{ index=25, value={*($T27*)&st_} }} + {{ index=26, value={*($T28*)&st_} }} + {{ index=27, value={*($T29*)&st_} }} + {{ index=28, value={*($T30*)&st_} }} + {{ index=29, value={*($T31*)&st_} }} + {{ index=30, value={*($T32*)&st_} }} + {{ index=31, value={*($T33*)&st_} }} + {{ index=32, value={*($T34*)&st_} }} + {{ index=33, value={*($T35*)&st_} }} + {{ index=34, value={*($T36*)&st_} }} + {{ index=35, value={*($T37*)&st_} }} + {{ index=36, value={*($T38*)&st_} }} + {{ index=37, value={*($T39*)&st_} }} + {{ index=38, value={*($T40*)&st_} }} + {{ index=39, value={*($T41*)&st_} }} + + index() + *($T2*)&st_ + *($T3*)&st_ + *($T4*)&st_ + *($T5*)&st_ + *($T6*)&st_ + *($T7*)&st_ + *($T8*)&st_ + *($T9*)&st_ + *($T10*)&st_ + *($T11*)&st_ + *($T12*)&st_ + *($T13*)&st_ + *($T14*)&st_ + *($T15*)&st_ + *($T16*)&st_ + *($T17*)&st_ + *($T18*)&st_ + *($T19*)&st_ + *($T20*)&st_ + *($T21*)&st_ + *($T22*)&st_ + *($T23*)&st_ + *($T24*)&st_ + *($T25*)&st_ + *($T26*)&st_ + *($T27*)&st_ + *($T28*)&st_ + *($T29*)&st_ + *($T30*)&st_ + *($T31*)&st_ + *($T32*)&st_ + *($T33*)&st_ + *($T34*)&st_ + *($T35*)&st_ + *($T36*)&st_ + *($T37*)&st_ + *($T38*)&st_ + *($T39*)&st_ + *($T40*)&st_ + *($T41*)&st_ + + + + + + {{ index=0, value={*($T2*)&st_[ix_%2]} }} + {{ index=1, value={*($T3*)&st_[ix_%2]} }} + {{ index=2, value={*($T4*)&st_[ix_%2]} }} + {{ index=3, value={*($T5*)&st_[ix_%2]} }} + {{ index=4, value={*($T6*)&st_[ix_%2]} }} + {{ index=5, value={*($T7*)&st_[ix_%2]} }} + {{ index=6, value={*($T8*)&st_[ix_%2]} }} + {{ index=7, value={*($T9*)&st_[ix_%2]} }} + {{ index=8, value={*($T10*)&st_[ix_%2]} }} + {{ index=9, value={*($T11*)&st_[ix_%2]} }} + {{ index=10, value={*($T12*)&st_[ix_%2]} }} + {{ index=11, value={*($T13*)&st_[ix_%2]} }} + {{ index=12, value={*($T14*)&st_[ix_%2]} }} + {{ index=13, value={*($T15*)&st_[ix_%2]} }} + {{ index=14, value={*($T16*)&st_[ix_%2]} }} + {{ index=15, value={*($T17*)&st_[ix_%2]} }} + {{ index=16, value={*($T18*)&st_[ix_%2]} }} + {{ index=17, value={*($T19*)&st_[ix_%2]} }} + {{ index=18, value={*($T20*)&st_[ix_%2]} }} + {{ index=19, value={*($T21*)&st_[ix_%2]} }} + {{ index=20, value={*($T22*)&st_[ix_%2]} }} + {{ index=21, value={*($T23*)&st_[ix_%2]} }} + {{ index=22, value={*($T24*)&st_[ix_%2]} }} + {{ index=23, value={*($T25*)&st_[ix_%2]} }} + {{ index=24, value={*($T26*)&st_[ix_%2]} }} + {{ index=25, value={*($T27*)&st_[ix_%2]} }} + {{ index=26, value={*($T28*)&st_[ix_%2]} }} + {{ index=27, value={*($T29*)&st_[ix_%2]} }} + {{ index=28, value={*($T30*)&st_[ix_%2]} }} + {{ index=29, value={*($T31*)&st_[ix_%2]} }} + {{ index=30, value={*($T32*)&st_[ix_%2]} }} + {{ index=31, value={*($T33*)&st_[ix_%2]} }} + {{ index=32, value={*($T34*)&st_[ix_%2]} }} + {{ index=33, value={*($T35*)&st_[ix_%2]} }} + {{ index=34, value={*($T36*)&st_[ix_%2]} }} + {{ index=35, value={*($T37*)&st_[ix_%2]} }} + {{ index=36, value={*($T38*)&st_[ix_%2]} }} + {{ index=37, value={*($T39*)&st_[ix_%2]} }} + {{ index=38, value={*($T40*)&st_[ix_%2]} }} + {{ index=39, value={*($T41*)&st_[ix_%2]} }} + + index() + *($T2*)&st_[ix_%2] + *($T3*)&st_[ix_%2] + *($T4*)&st_[ix_%2] + *($T5*)&st_[ix_%2] + *($T6*)&st_[ix_%2] + *($T7*)&st_[ix_%2] + *($T8*)&st_[ix_%2] + *($T9*)&st_[ix_%2] + *($T10*)&st_[ix_%2] + *($T11*)&st_[ix_%2] + *($T12*)&st_[ix_%2] + *($T13*)&st_[ix_%2] + *($T14*)&st_[ix_%2] + *($T15*)&st_[ix_%2] + *($T16*)&st_[ix_%2] + *($T17*)&st_[ix_%2] + *($T18*)&st_[ix_%2] + *($T19*)&st_[ix_%2] + *($T20*)&st_[ix_%2] + *($T21*)&st_[ix_%2] + *($T22*)&st_[ix_%2] + *($T23*)&st_[ix_%2] + *($T24*)&st_[ix_%2] + *($T25*)&st_[ix_%2] + *($T26*)&st_[ix_%2] + *($T27*)&st_[ix_%2] + *($T28*)&st_[ix_%2] + *($T29*)&st_[ix_%2] + *($T30*)&st_[ix_%2] + *($T31*)&st_[ix_%2] + *($T32*)&st_[ix_%2] + *($T33*)&st_[ix_%2] + *($T34*)&st_[ix_%2] + *($T35*)&st_[ix_%2] + *($T36*)&st_[ix_%2] + *($T37*)&st_[ix_%2] + *($T38*)&st_[ix_%2] + *($T39*)&st_[ix_%2] + *($T40*)&st_[ix_%2] + *($T41*)&st_[ix_%2] + +