I'm debugging a C application that has a segmentation fault. I already identified the variable that causes the problem. However, I do not know yet, when the variable is assigned so that it causes the Segmentation Fault.
Is there a way to set a breakpoint in GDB if a new value is being assigned to an existing variable?
You need a watchpoint
:
(gdb) watch my_var
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