Skip to content

Commit 29189f8

Browse files
committed
Added ~dump and ~strdump debug primitives description
1 parent bac4e6a commit 29189f8

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/develop/func/stdlib.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,23 @@ A variant of `parse_std_addr` that returns the (rewritten) address as a slice `s
632632

633633
## Debug primitives
634634

635-
Currently, only one function is available.
635+
Debug primitives can be used for inspecting state of various variables while running tests or console scripts.
636+
637+
#### ~dump
638+
639+
```func
640+
forall X -> () ~dump(X value) impure asm "s0 DUMP";
641+
```
642+
643+
Outputs a value.
644+
645+
#### ~strdump
646+
647+
```func
648+
() ~strdump(slice str) impure asm "STRDUMP";
649+
```
650+
651+
Dumps a string. Slice parameter bit length must be divisible by 8.
636652

637653
#### dump_stack
638654

0 commit comments

Comments
 (0)