diff options
Diffstat (limited to 'tools/gdb.html')
-rw-r--r-- | tools/gdb.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/gdb.html b/tools/gdb.html index 8dbdb74..72e3f2e 100644 --- a/tools/gdb.html +++ b/tools/gdb.html @@ -519,10 +519,16 @@ which its expression is valid. main () at test.c:10 10 set(&s, 2); +# Define the watchpoint on the location of the object to watch. + +(gdb) watch -l s->v + +# This is equivalent to the following. + (gdb) p &s->v $1 = (int *) 0x7fffffffe594 -# Define a watchpoint o the address of the member variable of the s instance. +# Define a watchpoint to the address of the member variable of the s instance. # This of course only makes sense as long as the s instance is not moved in memory. (gdb) watch *0x7fffffffe594 |