I have an array of pointers which holds the interface details. For example
tIfInfoStruct *gapIfTable[16];
memory has been allocated for the pointer while interface creation. For example
gapIfTable[14] = 0x39cc345.
After some sequence of operations , the value of gapIfTable[14]
becomes NULL(0x0)
. I want to watch, which part of the program was releasing the memory.
Whether I could be able to track gapIfTable[14]
using
gdb> watch *0x39cc345
I want my program to be stopped on gdb when the above memory address becomes NULL
, so that I can get the back trace in Gdb to find the culprit. I am running a multi threaded program.
Please correct If my understanding is wrong. If am wrong , please help me out with some solutions.