2

I have a source file with many functions and much more unusual things. I am deubugging an application with GDB and would like it to stop anytime it enters this specific source file.

How can I set a break point on an entire source file?

Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128
  • @MarkPlotnick , assume a source file with 100 functions. Are you going to set a breakpoint manually for every single one of them? –  Sep 08 '19 at 21:41
  • It's easier than typing a bunch of break commands. `rbreak myfile.c:.` will work in any reasonably modern gdb. My main question, though, was do you need to stop only at the entry to each function in a file, or also on return to a function by a called function or longjmp? – Mark Plotnick Sep 09 '19 at 02:10
  • `rbreak filename.cpp:.*` See also this [question](https://stackoverflow.com/q/9096624/50617). – Employed Russian Sep 09 '19 at 03:33

0 Answers0