From: Joel Brobecker Date: Thu, 3 Jan 2008 04:11:16 +0000 (+0000) Subject: * eval.c (evaluate_subexp_for_address): Provide frame address to X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ceef53c1cbc19f2c4de6e49a5b6f55f17e412fb7;p=binutils-gdb.git * eval.c (evaluate_subexp_for_address): Provide frame address to locate_var_value only if it will be needed. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 803027e8268..484e57c82c6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-01-03 Paul N. Hilfinger + + * eval.c (evaluate_subexp_for_address): Provide frame address to + locate_var_value only if it will be needed. + 2008-01-02 Jan Kratochvil * linux-nat.c (linux_child_follow_fork): Call also CHECK_FOR_THREAD_DB. diff --git a/gdb/eval.c b/gdb/eval.c index d5c63db920e..1f84d23d2fb 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -2150,11 +2150,13 @@ evaluate_subexp_for_address (struct expression *exp, int *pos, return value_zero (type, not_lval); } - else + else if (symbol_read_needs_frame (var)) return locate_var_value (var, block_innermost_frame (exp->elts[pc + 1].block)); + else + return locate_var_value (var, NULL); case OP_SCOPE: tem = longest_to_int (exp->elts[pc + 2].longconst);