I would like to set a conditional breakpoint with lldb. This is usually done using -c
option :
breakpoint set -f myFile.cpp -l 123 -c 'a==3'
However, in my case I want to test if a std::string
object is equal to a certain string value but doing this
breakpoint set -f myFile.cpp -l 123 -c 'a=="hello"'
does not work… Lldb does not complain (while gdb would return an error) but it ignores the condition string upon reaching the breakpoint and breaks too early…
This question is similar to this one but with lldb instead of gdb. The solution presented there
breakpoint set -f myFile.cpp -l 123 if strcmp(a, "hello")==0
does not seem to be valid with lldb
Lldb version used : 3.4