title: How to ask GDB to break at a function only after it's called certain times?
body: <p>For example, I have a function NamespaceA::ClassB::FunctionC() in my program. I know I can ask GDB to break there, by "break NamespaceA::ClassB::FunctionC". But what should I do if I only want GDB to break there, after this function is called, say, 100 times?</p>
  
  <p>I think a workaround solution is adding one more variable in the program, and then there is "break ... if cond" command in GDB i can use. But can i achieve the same thing without adding variables to my program?</p>
  
  <p>Thank you.</p>