Reputation: 4920
How do I get the address of a certain variable in gdb, with the command line that is.
Edit :
It doesn't work in constructor.
Upvotes: 0
Views: 112
Reputation: 56407
Compile with debug symbols (-g3) and use:
print &p
With p being the variable you want to take the address of.
Upvotes: 4