From 18ac6ffc9b119c8d55a1cd0339d47998076faf2b Mon Sep 17 00:00:00 2001 From: Siva Chandra Date: Sat, 29 Nov 2014 09:38:33 -0800 Subject: [PATCH] Check that thread stack temps are not already enabled before enabling them. This fixes a regression introduced by 6c659fc2c7cd2da6d2b9a3d7c38597ad3821832a. gdb/ChangeLog: * eval.c (evaluate_subexp): Check that thread stack temporaries are not already enabled before enabling them. --- gdb/ChangeLog | 5 +++++ gdb/eval.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c35f0aeaef4..4112438330d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-11-29 Siva Chandra Reddy + + * eval.c (evaluate_subexp): Check that the thread stack temporaries + are not already enabled before enabling them. + 2014-11-29 Yao Qi * arm-tdep.c (arm_analyze_prologue): Move local variables diff --git a/gdb/eval.c b/gdb/eval.c index a13793ca728..c2ab87986bc 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -69,7 +69,8 @@ evaluate_subexp (struct type *expect_type, struct expression *exp, int cleanup_temps = 0; if (*pos == 0 && target_has_execution - && exp->language_defn->la_language == language_cplus) + && exp->language_defn->la_language == language_cplus + && !thread_stack_temporaries_enabled_p (inferior_ptid)) { cleanups = enable_thread_stack_temporaries (inferior_ptid); cleanup_temps = 1; -- 2.30.2