Setting up breakpoints at all functions in a file in Qt Creator
I'm trying to read the source code of a project. There are many functions I would like to inspect. Right clicking and inserting breakpoints at all the functions takes lot of time.
It is possible to insert break points at all functions in a file using gdb command line. I was wondering if it can be done inside Qt Creator?
Yes, it is possible to give commands directly to GDB in Qt Creator. See Directly Interacting with Native Debuggers.
And yes, as you can read here it is possible set breakpoints on every function in a given file. What you need is the rbreak command:
rbreak file:regex If rbreak is called with a filename qualification, it limits the search for functions matching the given regular expression to the specified file. This can be used, for example, to set breakpoints on every function in a given file:
(gdb) rbreak file.c:.
The colon separating the filename qualifier from the regex may optionally be surrounded by spaces.