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

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?


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.

Need Your Help

Get access token for more than one scope from GoogleAPI's in Android

android oauth-2.0 google-api youtube-api android-youtube-api

I have an application which requests youtube data api's. I need to have access token for some request like to get video's, playlist etc. For this I can simply use GoogleAuthUtil class to get Token by

IDEA: How to change toolbar color indicating whether particular line is covered by tests?


I've embraced the darker side of productive coding and now find the "line covered" and "line not covered" color not too flashy and not sufficiently distinctive. I'd like to make it brighter (bright...