From 2a357a11b0974a6fdd8f75dbacf7d25ddd6b972f Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sat, 7 Sep 2024 21:35:05 +0200 Subject: [PATCH] `_y = x` explanation concentrate on `x`. Moving from plural to singular is a better description of what is actually occurring. After all, only `x` is considered in the example of use of gdb. As mentioned by @BartMassey in #482, it is possible that `y` is initialized. Given that discussing whether something is really initialized or not is out of scope of this book, or at least chapter, this part of the sentence is deleted and not replaced. --- microbit/src/05-led-roulette/debug-it.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/microbit/src/05-led-roulette/debug-it.md b/microbit/src/05-led-roulette/debug-it.md index 285d107c2..84c16b298 100644 --- a/microbit/src/05-led-roulette/debug-it.md +++ b/microbit/src/05-led-roulette/debug-it.md @@ -109,14 +109,13 @@ At any point you can leave the TUI mode using the following command: ``` We are now "on" the `_y = x` statement; that statement hasn't been executed yet. This means that `x` -is initialized but `_y` is not. Let's inspect those stack/local variables using the `print` command: +is initialized. Let's inspect the stack/local variable `x` using the `print` command: ``` (gdb) print x $1 = 42 (gdb) print &x $2 = (*mut i32) 0x20003fe8 -(gdb) ``` As expected, `x` contains the value `42`. The command `print &x` prints the address of the variable `x`.