Files
lix/tests/functional
blokyk daadfed9ae libcmd/repl: allow :st argument to be relative to current stack index
See [lix-project/lix#1156], but basically currently the `:st <n>`
debugger command doesn't allow any negative indices, and putting a plus
sign in front of the arg doesn't change anything; thus, we can exploit
that "design space" to allow users to move between different stack
frames easily, by simply prepending their arg with a +/- sign.

The actual behavior is little more nuanced when you account for errors:
as suggested by @pennae (thanks! :), when the user inputs an offset that
would result in an invalid frame index, the debugger instead clamps it
to the closest bound (i.e. 0 for negative offsets, $maxFrame for
positive ones) and just prints a warning.

Fixes #1156

[lix-project/lix#1156]: https://git.lix.systems/lix-project/lix/issues/1156

Change-Id: I02a0cdb6aaebbdb0515308880a3bf9c0d2fcd25e
2026-03-20 18:22:24 +01:00
..
2023-12-01 12:06:43 -05:00
2025-05-29 15:25:12 +02:00
2024-03-29 22:57:40 -07:00
2024-03-29 22:57:40 -07:00
2025-09-12 23:22:11 +02:00
2025-03-07 07:45:08 -05:00
2024-03-29 22:57:40 -07:00