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:
Employed Russian's answer looks very good, but since you say:
I do not know exactly what functions are been called and what functions are not.
Would a report of which functions are hit, generated by a code coverage tool such as gcov or something involving Valgrind be a good solution to your problem?