GDB: Break func1 only if the previous break was on func2

I have two functions: func1and func2, each with many breakpoints.

Is it possible to stop GDB at a breakpoint func2if the previous bit has been reached func1?

+5
source share
1 answer

The best way to do this is to use commands at breakpoints.

You can direct GDB to execute certain commands (for example, to increase the counter) when you hit two breakpoints. Execution stops conditionally based on the number of these variables / flags.

. , . . , .

+2

All Articles