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 中某个变量的地址。
编辑 :
它在构造函数中不起作用。
使用调试符号 (-g3) 编译并使用:
print &p
p 是您要获取地址的变量。