I have two functions, func1 and func2, each with a breakpoint set.
Is it possible to have GDB stop on the func2 breakpoint iff the previous breakpoint hit was func1?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best way to do this is to use commands in breakpoints.
You can direct GDB to execute certain commands (like, to increment a counter) when the two breakpoints are hit. The execution is halted conditionally based on the count of these variables/flags.
I found this information on this link. Please refer the same for further details. The article is very well-written with proper examples. Hope this helps.