I want to set a break point, and only stop at it, when one pointer called rc
is NULL
.
I did like that
b task.c:190 if rc==NULL
but gdb says, NULL
would be unrecognized, so I changed to
b task.c:190 if(!rc)
which seems worked.
But I am not very sure, correct me if I am doing wrong.
try to re-compile your project with CFLAG -ggdb3, then set the break point.Or use (void *)0 instead of NULL
NULL is a C macro whose value is set to 0 Probably the gdb is not able to resolve the macro value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With