So I tried to set a conditional breakpoint such as:
Codelite starts to add it to the breakpoints, but then removes it immediately. Are subroutine calls not permitted in conditional breakpoints? I'm looking through the gdb docs to see what it says about this. Conditionals can be an expression, and expressions generally allow for function calls. But maybe codelite does not support this. Or maybe I just don't have the right expression fu.
Last edited by systemdlete on Sat Dec 03, 2022 4:56 am, edited 1 time in total.
Break conditions can have side effects, and may even call functions in your program. This can be useful, for example, to activate functions that log program progress, or to use your own print functions to format special data structures
I just tried an example in gdb (invoked at command line, not from codelite), and it does in fact work. I can "info break" and I see my conditional breakpoint listed:
I forgot to mention that I am using codelite from your repo, which is codelite v16.5.0. I am running on Devuan Chimaera (debian bullseye with the shitsemd dleted). I need to also add that my program is statically linked.
I think it is easy enough to run the simple test, above, to recreate the problem. I tried various means of specifying the condition in the input box of the breakpoint dialog. It could be that it is just a matter of getting the right invocation there.