Skip to content

V4-repl v0.6.0 - Enhanced Debugging Meta-Commands

Latest

Choose a tag to compare

@kirisaki kirisaki released this 04 Nov 19:06
· 2 commits to main since this release

🎯 New Features

Enhanced Debugging Meta-Commands

This release adds powerful new debugging and introspection commands to the V4 REPL:

  • .stack - Now displays both data stack and return stack together for complete state visibility
  • .rstack - Dedicated return stack view with call trace information (addresses shown most recent first)
  • .dump [addr] [len] - Memory hexdump with auto-continuation feature
    • Displays 16 bytes per row with hex values and ASCII representation
    • Auto-detects hex (0x prefix) or decimal addresses
    • Default: 256 bytes, continues from last position on repeated calls
  • .see <word> - Bytecode disassembly for user-defined words
    • Shows VM index, bytecode length, and hex dump of compiled code
    • Useful for debugging word definitions and understanding compilation

🔧 Dependencies

  • V4-engine v0.12.0 - Required for panic handler support and return stack APIs (vm_rs_depth_public, vm_rs_copy_to_array)
  • V4-front v0.5.0 (unchanged)

📝 Example Usage

V4 REPL v0.2.0
Type .help for help, Ctrl+D to exit.

> : SQUARE DUP * ;
ok.

> .see SQUARE
Word: SQUARE
VM index: 10
Bytecode length: 3 bytes

Disassembly:
Offset  Bytes                    
------  -------------------------
0000    01 12 51 

Note: Use V4-front disassembler for opcode names.
      Bytecode is in V4 instruction format.

> 5 SQUARE .
25 ok.

> .stack
Data Stack (depth: 0):
  <empty>

Return Stack (depth: 0):
  <empty>

📦 Full Changelog

See CHANGELOG.md for complete details.


Commits in this release: 5 (aa043c3, 221c83e, 43ebcc4, 2238ec7, cc47bde)