title: How to set a breakpoint in gdb for an anonymous namespace?
body: <p>In my code base, there are some callbacks functions which are defined in anonymous namespace. I am debugging in gdb and I want to set breakpoint in the function using function name. 
  I also tried putting breakpoint by using filename : linenum , but that will generally work if the file is already loaded or else it will say 
  "No source file found"
  Make breakpoint pending on future shared library load? (y or [n]) n</p>
  
  <p>So, the workaround is that once the debugger is inside the same file, I can set breakpoint using filename : line number</p>
  
  <p>But is there any other way to set breakpoints inside anonymous namespace ?</p>
  
  <p>Related stackoverflow questions :
  <a href="https://stackoverflow.com/questions/7388104/how-to-set-breakpoint-by-function-name-inside-anonymous-namespace-in-visual-stud">How to set breakpoint by function name inside anonymous namespace in Visual Studio?</a></p>
  
  <p>But this does not solve the problem over here.</p>
  
  <p>As per some post in stackoverflow, </p>
  
  <ol>
  <li>I tried using 
  ::function_name()
  but this does not work. </li>
  <li>anonymous namespace::function_name()</li>
  </ol>
  
  <p>namespace 
  {
      int function_name(int a, int b)
      {
         return a+b;
      }
  }</p>
  
  <p>"No source file found"
  /root/workspace/ProtocolInterface.cpp.
  Make breakpoint pending on future shared library load? (y or [n]) y</p>
  
  <p>Even if the breakpoint pending, it does not break at the mentioned function.</p>