Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
因为用gdb调试c++代码很不方便,尤其是用stl的时候。例如,如果要检查向量中的内容,则需要使用一些代码,例如:
print *(myVector._M_impl._M_start)@myVector.size()
结果并不简单。
此外,如果你想打印 std::map,似乎没有简单的方法。