Using gdb stop the program when it is using any function from file X

前端 未结 6 1937
广开言路
广开言路 2020-12-03 04:57

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:



        
6条回答
  •  佛祖请我去吃肉
    2020-12-03 05:44

    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?

提交回复
热议问题