GDB C++ - Inspecting STL Containers when looking at a core dump?

让人想犯罪 __ 提交于 2019-12-01 18:42:26

print the vector:

(gdb) print *vec

Then familiarize yourself with the internals of your implementation's vector and print the raw buffer. Often called "_M_buffer" or something like that. Depending on how yours is done there may be an internal object that the buffer is inside of.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!