aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gdb.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2023-09-09 08:32:23 +0000
committerjohannst <johannst@users.noreply.github.com>2023-09-09 08:32:23 +0000
commit3839b5e390c53b74f58003cf082030df02391f9a (patch)
treefeb4c3e7c3e6674200e49594b49bd4be7bd1bd89 /tools/gdb.html
parentf0cf514eb3ca30c5170e534c3861ad73996c7726 (diff)
downloadnotes-3839b5e390c53b74f58003cf082030df02391f9a.tar.gz
notes-3839b5e390c53b74f58003cf082030df02391f9a.zip
deploy: 30bc89f36a0310eb5c9c710f0544577b3688fd77
Diffstat (limited to 'tools/gdb.html')
-rw-r--r--tools/gdb.html8
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(&amp;s, 2);
+# Define the watchpoint on the location of the object to watch.
+
+(gdb) watch -l s-&gt;v
+
+# This is equivalent to the following.
+
(gdb) p &amp;s-&gt;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