I am using google\'s heap checker to track down a memory leak. It gives me a stack trace such as:
Leak of 21 bytes in 1 objects allocated from:
Assuming your binary has debug information g++ -g you may be able to use x/ to get the info, I know that works for vtables.
g++ -g
x/
x/xw to print hex words of memory, and gdb will annotate the left side with information about what's at the address.
x/xw