我正在尝试调试一个核心转储,并且我找到了结构,0x00000055558..
当我键入时,它的第一个变量指向x 0x00000055558..
它,它输出:
0x55558.. <_ZTVN15NameSpace22ClassNameE+16>: 0x0000005..
这是否意味着此处定义了此类的变量?尝试返回 16 个字节并将其转换为 ClassName 不会给出有效值。
对于这样的新手问题,我很抱歉,但我在谷歌中找不到这个问题很长时间了。
See the other answers for ways to demangle that symbol name. It will probably turn out to be something like "vtable for NameSpace::ClassName". (g++ symbols beginning with _ZTV are vtables.)
Finding a pointer to an offset inside a vtable is usually a very good indication that you have found memory containing an object whose most-derived type is that class. It doesn't guarantee it's not left over deallocated memory or some such thing, of course.