aboutsummaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-05-11 05:22:51 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-05-11 05:22:51 +0300
commit35de6ecfbbc272f25d12370785b1032447f37164 (patch)
tree43b33dcab3afaf7e1f04e54135b372070964dbba /debug.c
parent0ebae58196378b06e083109701875f15c60a7b9a (diff)
downloadegawk-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.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/debug.c b/debug.c
index 32b308af..5d7db01b 100644
--- a/debug.c
+++ b/debug.c
@@ -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);