public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][_GLIBCXX_DEBUG][_GLIBCXX_INLINE_VERSION] Add missing printers
@ 2022-09-22 17:06 François Dumont
  2022-09-28 23:29 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: François Dumont @ 2022-09-22 17:06 UTC (permalink / raw)
  To: libstdc++; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

Hi

     This patch fix failures when _GLIBCXX_INLINE_VERSION mode and running:

make check-debug RUNTESTFLAGS=prettyprinters.exp

     libstdc++: [_GLIBCXX_INLINE_VERSION] Add gdb pretty print for 
_GLIBCXX_DEBUG

     In _GLIBCXX_DEBUG mode containers are in std::__debug namespace but 
not template
     parameters. In _GLIBCXX_INLINE_VERSION mode most types are in 
std::__8 namespace but
     not std::__debug containers. We need to register specific type 
printers for this
     combination.

     libstdc++-v3/ChangeLog:

             * python/libstdcxx/v6/printers.py 
(add_one_template_type_printer): Register
             printer for types in std::__debug namespace with template 
parameters in std::__8
             namespace.

Ok to commit ?

François

[-- Attachment #2: printers.py.patch --]
[-- Type: text/x-patch, Size: 755 bytes --]

diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 24a6462e496..1e9d0627e9f 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -2036,6 +2036,10 @@ def add_one_template_type_printer(obj, name, defargs):
         printer = TemplateTypePrinter(ns+name, defargs)
         gdb.types.register_type_printer(obj, printer)
 
+        # Add type printer for same type in debug namespace:
+        printer = TemplateTypePrinter('std::__debug::'+name, defargs)
+        gdb.types.register_type_printer(obj, printer)
+
 class FilteringTypePrinter(object):
     r"""
     A type printer that uses typedef names for common template specializations.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][_GLIBCXX_DEBUG][_GLIBCXX_INLINE_VERSION] Add missing printers
  2022-09-22 17:06 [PATCH][_GLIBCXX_DEBUG][_GLIBCXX_INLINE_VERSION] Add missing printers François Dumont
@ 2022-09-28 23:29 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2022-09-28 23:29 UTC (permalink / raw)
  To: François Dumont; +Cc: libstdc++, gcc-patches

On Thu, 22 Sept 2022 at 18:06, François Dumont via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> Hi
>
>      This patch fix failures when _GLIBCXX_INLINE_VERSION mode and running:
>
> make check-debug RUNTESTFLAGS=prettyprinters.exp
>
>      libstdc++: [_GLIBCXX_INLINE_VERSION] Add gdb pretty print for
> _GLIBCXX_DEBUG
>
>      In _GLIBCXX_DEBUG mode containers are in std::__debug namespace but
> not template
>      parameters. In _GLIBCXX_INLINE_VERSION mode most types are in
> std::__8 namespace but
>      not std::__debug containers. We need to register specific type
> printers for this
>      combination.
>
>      libstdc++-v3/ChangeLog:
>
>              * python/libstdcxx/v6/printers.py
> (add_one_template_type_printer): Register
>              printer for types in std::__debug namespace with template
> parameters in std::__8
>              namespace.
>
> Ok to commit ?

OK, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-28 23:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 17:06 [PATCH][_GLIBCXX_DEBUG][_GLIBCXX_INLINE_VERSION] Add missing printers François Dumont
2022-09-28 23:29 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).