aboutsummaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index 9568c0a1..faf4f89d 100644
--- a/debug.c
+++ b/debug.c
@@ -1790,6 +1790,8 @@ initialize_watch_item(struct list_item *w)
} else if (symbol->type == Node_var_array) {
w->flags |= CUR_IS_ARRAY;
w->cur_size = assoc_length(symbol);
+ } else if (symbol->type == Node_val && (symbol->flags & REGEX) != 0) {
+ w->cur_value = dupnode(symbol);
} /* else
can't happen */
}
@@ -3703,7 +3705,10 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp)
print_func(fp, "%g", m->numbr);
} else if ((m->flags & STRING) != 0)
pp_string_fp(print_func, fp, m->stptr, m->stlen, '"', false);
- else
+ else if ((m->flags & REGEX) != 0) {
+ print_func(fp, "@");
+ pp_string_fp(print_func, fp, m->stptr, m->stlen, '/', false);
+ } else
print_func(fp, "-?-");
print_func(fp, " [%s]", flags2str(m->flags));
break;