From f7f0d6318231ff081ed6ff2ef30d8e1823e11c70 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 8 Jan 2019 15:39:53 -0800 Subject: 4915 In the process of building next-token I finally added some support for a debugging situation I've found myself in a couple of times: wondering "what changed this memory location"? --- subx/Readme.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'subx/Readme.md') diff --git a/subx/Readme.md b/subx/Readme.md index 42f2cedb..93ef21e1 100644 --- a/subx/Readme.md +++ b/subx/Readme.md @@ -466,6 +466,12 @@ rudimentary but hopefully still workable toolkit: Now the trace should have a lot more detail on which of these labels was reached, and precisely when the exit was taken. +* If you find yourself wondering, "when did the contents of this memory + address change?", `subx run` has some rudimentary support for _watch + points_. Just insert a label starting with `$watch-` before an instruction + that writes to the address, and its value will start getting dumped to the + trace after every instruction thereafter. + * Once we have a sense for precisely which instructions we want to look at, it's time to look at the trace as a whole. Key is the state of registers before each instruction. If a function is receiving bad arguments it becomes -- cgit 1.4.1-2-gfad0