Possible Duplicate:
Can I set a breakpoint on 'memory access' in GDB?
I want to trace how a specific variable is initialized,
can gdb do this kind of job?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The gdb command
watch <expr>sets a breakpoint on write,rwatchon read, andawatchon read or write. You can use them as you would with breakpoints, with two considerations:$esp+...)show can-use-hw-watchpoints.