Hi, i am newly to c++ and debugging with gdb. I tryed to debug my program where the value of global variable gets empty in some part of the code . I compile the program with -g , then run gdb command and set the variable to be watched with watch [variable_name]. Than run command , and the program stop at the line of assigning, but after continue-command, program did not stops on any line till the end..My program has many files respectively translation units. This is all I think.. Do I miss something?
What I have tried:
I saw, that the address of that variable which value I am interested in did not change from the moment of its creation, but somehow its value does.