https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86112
Bug ID: 86112 Summary: Python printers don't work on Python 2.6 Product: gcc Version: 8.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- Traceback (most recent call last): File "blah/libstdc++.so.6.0.25-gdb.py", line 61, in <module> register_libstdcxx_printers(gdb.current_objfile()) File "blah/../share/gcc-8.1.0/python/libstdcxx/v6/__init__.py", line 28, in register_libstdcxx_printers from .printers import register_libstdcxx_printers File "blah/../share/gcc-8.1.0/python/libstdcxx/v6/printers.py", line 1441 defargs = { n: d.replace('std::', ns) for n,d in defargs.items() } ^ SyntaxError: invalid syntax The dict comprehension syntax is only supported from Python 2.7 onwards. It needs to be: defargs = dict((n, d.replace('std::', ns)) for (n,d) in defargs.items())