debugger: Display values of reference variables

Previously, the debugger displayed `ref int` variables like this:

    ref_int: <unsupported-data-type>
    <void>: <unsupported-data-type>

This commit introduces `dbg_variable_to_string()` to dereference these
variables and display their underlying value. Both the command-line and
DAP debugger interfaces have been updated to use this new functionality.
This commit is contained in:
kichikuou
2025-09-28 11:11:24 +09:00
parent 6f661fb370
commit 729957b842
4 changed files with 56 additions and 15 deletions
+1
View File
@@ -94,6 +94,7 @@ void dbg_print_vm_state(void);
void dbg_print_current_line(void);
union vm_value dbg_eval_string(const char *str, struct ain_type *type_out);
struct string *dbg_value_to_string(struct ain_type *type, union vm_value value, int recursive);
struct string *dbg_variable_to_string(struct ain_type *type, struct page *page, int slot, int recursive);
void dbg_dap_init(void);
void dbg_dap_quit(void);