Seems like a basic question, but I couldn't find anything.
How do I set a conditional breakpoint in Rust in GDB, for string equality?
I have the function:
fn find_max_subst(subst_word: &String, other_word: &String) -> u64 {
I would like to break on *subst_word == "BROAD" && *other_word == "BOARD"
, but setting this breakpoint on the first line of the function does not work, it just breaks regardless of the values.
Doing the following in GDB doesn't work either:
(gdb) p *subst_word == "CREATION"
Structure has no component named operator==.