diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a7eb64d11d6..6e4b9a5a301 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-12-03 Joel Brobecker + + * ada-lang.c (create_excep_cond_exprs): Force EXP to NULL + when parse_exp_1 threw an error. Add comment. + 2013-12-03 Joel Brobecker * NEWS: Mention "-list-features" in the entry documenting diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 417232c26e2..786ca7acd43 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -11461,9 +11461,18 @@ create_excep_cond_exprs (struct ada_catchpoint *c) block_for_pc (bl->address), 0); } if (e.reason < 0) - warning (_("failed to reevaluate internal exception condition " - "for catchpoint %d: %s"), - c->base.number, e.message); + { + warning (_("failed to reevaluate internal exception condition " + "for catchpoint %d: %s"), + c->base.number, e.message); + /* There is a bug in GCC on sparc-solaris when building with + optimization which causes EXP to change unexpectedly + (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982). + The problem should be fixed starting with GCC 4.9. + In the meantime, work around it by forcing EXP back + to NULL. */ + exp = NULL; + } } ada_loc->excep_cond_expr = exp;