Check that thread stack temps are not already enabled before enabling them.
authorSiva Chandra <sivachandra@chromium.org>
Sat, 29 Nov 2014 17:38:33 +0000 (09:38 -0800)
committerSiva Chandra <sivachandra@chromium.org>
Sat, 29 Nov 2014 23:47:39 +0000 (15:47 -0800)
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
gdb/eval.c

index c35f0aeaef45811339b354d1dab8b3f7d7fe076f..4112438330df46c461b5a88fe4a6d96b1e461892 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-29  Siva Chandra Reddy  <sivachandra@google.com>
+
+       * eval.c (evaluate_subexp): Check that the thread stack temporaries
+       are not already enabled before enabling them.
+
 2014-11-29  Yao Qi  <yao@codesourcery.com>
 
        * arm-tdep.c (arm_analyze_prologue): Move local variables
index a13793ca7289020643dc909ebe48ad0b0e536cde..c2ab87986bc4287b464282dd2a7b97cd4f5aee27 100644 (file)
@@ -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;