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

前端 未结 6 1939
广开言路
广开言路 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:37

    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.

提交回复
热议问题