I want to add watch or print a specific global variable defined and declared in a particular file of a large code-base. So, it is possible that multiple variables of same name with different Linkageexists in the code-base. I know how to add watch or print a local and global variable in a single file project using GDB.
I am using gdb on my Ubuntu machine. I tried google but couldn't get an answer.