[PATCH] Fix regression introduced by 6c659fc2c7cd2da6d2b9a3d7c38597ad3821832a
Siva Chandra
sivachandra@google.com
Sat Nov 29 18:08:00 GMT 2014
The regression was pointed out here:
https://sourceware.org/ml/gdb-patches/2014-11/msg00728.html
It was introduced by my patch which was pushed as
6c659fc2c7cd2da6d2b9a3d7c38597ad3821832a. What my patch did was to
make evaluate_subexp non re-entrant. As in, if evaluate_subexp is
called with *pos == 0 while a top level expression is under
evaluation, then it will crash with symptoms similar to those reported
above. The attached patch fixes this problem and hence the regression.
Jan Kratochvil has kindly tested it for me and confirmed that it
indeed fixes the regression and does not introduce any new ones.
gdb/ChangeLog:
2014-11-29 Siva Chandra Reddy <sivachandra@google.com>
* eval.c (evaluate_subexp): Check that thread stack temporaries
are not already enabled before enabling them.
-------------- next part --------------
diff --git a/gdb/eval.c b/gdb/eval.c
index a13793c..c2ab879 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;
More information about the Gdb-patches
mailing list