and I would like to know if there is any way to stop a program when is using a function from a certain file. Ideally what I am looking for is something like:
gdb breakpoints have a couple of syntax... See here.
It won't break on any function in the file though....
Edit: You could do something stupid like making all function call a dummy function void foo(void), and breakpoint inside. At least you would break inside the file, and should be trivial to find which function in side of file X is being called.