Conditional breakpoint in gdb
First you have to setup a break point. (gdb) b 'server::Checks::chkCleardigits(ost::Script::Line*, ost::ScriptImage*)' don't forget the leading ' before server, so that gdb can complete the whole function prototype for you. Check breakpoint info (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x080565f4 in server::Checks::chkCleardigits(ost::Script::Line*, ost::ScriptImage*) at checks.cpp:624 breakpoint already hit 1 time Run the program, and then you find that there are so many calls to this function. However, you are only interested in one particular call. And most importantly, you know a condition which is unique to this call, line->argc>1 Set condition: (gdb) condition 1 line->argc>1 (gdb) info b Num Type Disp Enb Address What 1 breakpoint keep y 0x080565f4 in server::Checks::chkCleardigits(ost::Script::Line*, ost::ScriptImage*)