I have a process coredump on a line like
// ptr is boost::shared_ptr<Whatever>
assert(ptr.unique())
That is there are two shared_ptr referencing same object, but program logically expects exclusive ownership. It's logic problem, not memory corruption.
Using gdb I can see address (e.g. 0x001234567890) of pointer, contained in ptr and verify that it's use_count == 2.
Using hexdump on something like it I can easily find other occurrences:
$ xxd core2 | fgrep '9078 5634 1200'
114e3e1e0109c 002c 307f 0000 9078 5634 1200 0000 ...
15b8b2ba000d7 ffa2 307f 0000 9078 5634 1200 0000 ...
1618b644000e7 7fa3 307f 0000 9078 5634 1200 0000 ...
There is a command find in gdb than can search specified region for specified value, but it need correct allocated memory region.
There is a command info mem which shows info about memory regions, but it doesn't work for coredumps.
Are there other ways to find, where this address/value is stored?