本文介绍了使用gcc-4.8和mac os 10.9的GDB 7.6 STL漂亮打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力按照我的Mac上的gdb在此处中所述获得漂亮的打印件.我通过macports并使用gcc-4.8下载了最新的gdb.我加载了~/.gdbinit文件,并且打印机已注册,但是每当我打电话时print myVector它给了我原始输出.有什么建议我可以做什么?非常感谢大家!

I'm struggling to get the pretty prints as described here in gdb working on my mac. I downloaded the latest gdb through macports and using gcc-4.8.I loaded the ~/.gdbinit file and the printers are registered, but whenever I call print myVector it gives me the raw output. Any suggestions what I could do? Thanks a lot guys!

推荐答案

要使用带有libc ++的漂亮打印机(Clang ++/LLVM中使用的新库),请使用以下新漂亮打印机:

To have pretty printer with libc++ (new library used in Clang++/LLVM) use this new pretty printer:

https://github.com/koutheir/libcxx-pretty-printers

.gdbinit几乎相同(请参见示例)

The .gdbinit is almost the same (see sample)

我刚刚在OS X 10.10上使用Eclipse Luna进行了尝试,并且可以使用.

I've just tried with Eclipse Luna on OS X 10.10 and it works.

这篇关于使用gcc-4.8和mac os 10.9的GDB 7.6 STL漂亮打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 03:54