#
(gdb) set $string_var = “StringToMatch” (gdb) cond 1 strcmp (string_variable_in_code, $string_var) == 0
- Can be done using inline ASM code. asm volatile (“int3;”);
- These can’t be disabled, so it’s a good idea to keep them conditional. For eg: if (NULL == string) { * I want to break here * asm volatile (“int3;”); }
- Example code : https://github.com/kmcallister/embedded-breakpoints