在Ubuntu 13.10中设置GDB漂亮打印
我尝试根据此anwer设置GDB漂亮打印(以便更轻松地使用标准容器)。我没有使用svn的python漂亮打印机代码,而是使用ubuntu附带的代码。经过其余的过程后,启动gdb时出现以下错误消息: For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Traceback (most recent call last): File "<string>", line 3, in <module> File "/home/nietaki/gdb_printers/python/libstdcxx/v6/printers.py", line 54 raise ValueError, "Cannot find type %s::%s" % (str(orig), name) ^ SyntaxError: invalid syntax /home/nietaki/.gdbinit:6: Error in sourced command file: Error while executing Python code. 在更深入地研究问题之后,我发现了更深层次的根源-gdb中使用的Python 3与libstdc ++漂亮打印机不兼容。 …