From e11e8858ea87dda6f70308e61c80cabfa67ae0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisend=C3=B6rfer?= Date: Mon, 13 Feb 2023 15:27:14 +0100 Subject: [PATCH] Documentation: watch example for arbitrary address (#3268) Fixes #3266 --- Documentation/cli/README.md | 3 ++- pkg/terminal/command.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/cli/README.md b/Documentation/cli/README.md index bb3224d5..8d49e9df 100644 --- a/Documentation/cli/README.md +++ b/Documentation/cli/README.md @@ -699,8 +699,9 @@ Set watchpoint. The memory location is specified with the same expression language used by 'print', for example: watch v + watch -w *(*int)(0x1400007c018) -will watch the address of variable 'v'. +will watch the address of variable 'v' and writes to an int at addr '0x1400007c018'. Note that writes that do not change the value of the watched memory address might not be reported. diff --git a/pkg/terminal/command.go b/pkg/terminal/command.go index c3f802ac..3553e78e 100644 --- a/pkg/terminal/command.go +++ b/pkg/terminal/command.go @@ -144,8 +144,9 @@ See also: "help on", "help cond" and "help clear"`}, The memory location is specified with the same expression language used by 'print', for example: watch v + watch -w *(*int)(0x1400007c018) -will watch the address of variable 'v'. +will watch the address of variable 'v' and writes to an int at addr '0x1400007c018'. Note that writes that do not change the value of the watched memory address might not be reported.