[committed] libstdc++: Add GDB printers for <chrono> types

Tom Tromey tromey@adacore.com
Wed Sep 27 15:37:31 GMT 2023


>>>>> Jonathan Wakely via Gcc-patches <gcc-patches@gcc.gnu.org> writes:

Replying to a quite old email...

I ran a Python linter on the libstdc++ pretty-printers.

I have fixes for most of the issues that are worth fixing (I didn't
bother with line lengths -- FWIW in gdb we just run 'black' and don't
worry about these details), but the patch I'm replying to had a problem
that I didn't know how to fix:

> +class StdChronoTimeZoneRulePrinter:
[...]
> +        if kind == 0: # DayOfMonth
> +                start = '{} {}{}'.format(month, ordinal_day)

flake8 points out that this call to format has three placeholders but
only two arguments.

Tom


More information about the Gcc-patches mailing list