diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-05-11 05:22:51 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-05-11 05:22:51 +0300 |
commit | 35de6ecfbbc272f25d12370785b1032447f37164 (patch) | |
tree | 43b33dcab3afaf7e1f04e54135b372070964dbba /debug.c | |
parent | 0ebae58196378b06e083109701875f15c60a7b9a (diff) | |
download | egawk-35de6ecfbbc272f25d12370785b1032447f37164.tar.gz egawk-35de6ecfbbc272f25d12370785b1032447f37164.tar.bz2 egawk-35de6ecfbbc272f25d12370785b1032447f37164.zip |
Further fix to eval "" in debugger.
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -5560,21 +5560,24 @@ do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) this_func->param_cnt -= ecount; } - /* always destroy symbol "@eval", however destroy all newly installed + /* + * Always destroy symbol "@eval", however destroy all newly installed * globals only if fatal error (execute_code() returing NULL). */ pop_context(); /* switch to prev context */ free_context(ctxt, (ret_val != NULL)); /* free all instructions and optionally symbols */ - /* - * May 2014: - * Don't do this. f points into the context we just released. - * Only showed up on Fedora 20 / Ubuntu 14.04. - * - * if (ret_val != NULL) - * destroy_symbol(f); // destroy "@eval" - */ + if (ret_val != NULL) { + /* + * Remove @eval from FUNCTAB, so that above code + * will work the next time around. + */ + NODE *s = make_string("@eval", 5); + + (void) assoc_remove(func_table, s); + unref(s); + } free_srcfile(the_source); |