[PATCH] libstdc++: Add pretty printer for std::span

2022-04-04 Thread Philipp Fent via Gcc-patches
This improves the debug output for C++20 spans. Before: {static extent = 18446744073709551615, _M_ptr = 0x7fffb9a8, _M_extent = {_M_extent_value = 2}} Now with StdSpanPrinter: std::span of length 2 = {1, 2} --- libstdc++-v3/python/libstdcxx/v6/printers.py | 38 +++ .../libstdc

Re: [PATCH] libstdc++: Add pretty printer for std::span

2022-04-19 Thread Philipp Fent via Gcc-patches
On 04.04.22 13:39, Jonathan Wakely wrote: Nice, thanks. I'll get this committed in time for GCC 12 (and backport it to release branches too). I've attached a rebased patch for trunk and tested it on x86_64-linux. I also backported it for the release branches, gcc-11 tests also pass, on gcc-10

Re: [PATCH] libstdc++: Add pretty printer for std::span

2022-04-19 Thread Philipp Fent via Gcc-patches
On 19.04.22 12:28, Jonathan Wakely wrote: Thanks, but we still need the DCO sign-off as I mailed about last week. Thanks for the clarification, your last mail didn't appear to have content, so I might have missed that part. I've now added my DCO sign-off. Best PhilippFrom 64b6779c2694f57981e

[PATCH 1/2] libstdc++: Fix pretty printer tests of tuple indexes

2022-09-04 Thread Philipp Fent via Gcc-patches
Signed-off-by: Philipp Fent --- libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc | 2 +- libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc b/libstdc++-

[PATCH 2/2] libstdc++: Add pretty printer for std::stringstream

2022-09-04 Thread Philipp Fent via Gcc-patches
Signed-off-by: Philipp Fent --- libstdc++-v3/python/libstdcxx/v6/printers.py | 37 +++ .../libstdc++-prettyprinters/debug.cc | 5 +++ .../libstdc++-prettyprinters/simple.cc| 5 +++ .../libstdc++-prettyprinters/simple11.cc | 5 +++ 4 files changed, 52 inser

[PATCH v2] libstdc++: Add pretty printer for std::stringstreams

2022-09-06 Thread Philipp Fent via Gcc-patches
To display (o-,i-)stringstreams in the common case, we just print the underlying stringbuf, without the many ios_base members. In the unconventional case that the underlying streambuf was redirected, we report the redirected target. Signed-off-by: Philipp Fent --- libstdc++-v3/python/libstdcxx/v

Re: [PATCH 2/2] libstdc++: Add pretty printer for std::stringstream

2022-09-12 Thread Philipp Fent via Gcc-patches
Hi Jonathan, I've sent an updated patch addressing your comments here: https://gcc.gnu.org/pipermail/libstdc++/2022-September/054587.html Details below. On 06.09.22 13:27, Jonathan Wakely wrote: +pbase = self.val['_M_out_beg'] +pptr = self.val['_M_out_cur'] +egptr = sel

[PATCH] libstdc++: Add pretty printer for std::initializer_list

2022-04-24 Thread Philipp Fent via Gcc-patches
Re-using the std::span printer, this now shows the contents of the initializer list instead of the pointer and length members. Signed-off-by: Philipp Fent --- libstdc++-v3/python/libstdcxx/v6/printers.py | 23 +-- .../libstdc++-prettyprinters/cxx11.cc | 6 + 2 files