Skip to content

Commit

Permalink
_y = x explanation concentrate on x.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Arthur-Milchior committed Sep 7, 2024
1 parent 7100443 commit 2a357a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions microbit/src/05-led-roulette/debug-it.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 2a357a1

Please sign in to comment.