From 35de6ecfbbc272f25d12370785b1032447f37164 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 11 May 2014 05:22:51 +0300 Subject: Further fix to eval "" in debugger. --- debug.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'debug.c') 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); -- cgit v1.2.3