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.
我在我的日志文件中得到了一个地址,例如 0x7fc9e401a02a,我知道这个地址是一个 Connection 类型的指针。
然后我启动GDB,我想知道的是:如何将此地址转换为Connection*类型的临时变量,并显示Connection*的相关信息?
如何做到这一点,任何提示?
因为我的 Connection 类有一个命名空间,所以我应该做如下:
print * ('MyNameSpace::Connection' *) 0x7fc9e401a02a
感谢 JaredC 和 dbrank0 的回答。