In Gdb how to set conditional breakpoint to a function's 3rd line

Posted by Vereb on Stack Overflow See other posts from Stack Overflow or by Vereb
Published on 2010-06-10T09:31:18Z Indexed on 2010/06/10 9:52 UTC
Read the original article Hit count: 174

Filed under:

How can I set a conditional breakpoint to a function's 3rd line in GDB?

I know I could give the file name + line number but this is not working for me.
I have to store the gdb commands as a script to repeat it later and I don't want to change the script every time the source file is changing.

© Stack Overflow or respective owner

Related posts about gdb