Can I specify that I want gdb to break at line x when char* x points to a string whose value equals "hello"? If yes, how?
char* x
"hello"
You can use strcmp:
strcmp
break x:20 if strcmp(y, "hello") == 0
20 is line number, x can be any filename and y can be any variable.
20
x
y
1.4m articles
1.4m replys
5 comments
57.0k users