aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-01-03 04:11:16 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-01-03 04:11:16 +0000
commitceef53c1cbc19f2c4de6e49a5b6f55f17e412fb7 (patch)
tree8779eafb99695e07b3b074e95883fbdc6f543842 /gdb
parentf2a9c676b7e4d2d0fa3017fde699910b87439058 (diff)
downloadfsf-binutils-gdb-ceef53c1cbc19f2c4de6e49a5b6f55f17e412fb7.zip
fsf-binutils-gdb-ceef53c1cbc19f2c4de6e49a5b6f55f17e412fb7.tar.gz
fsf-binutils-gdb-ceef53c1cbc19f2c4de6e49a5b6f55f17e412fb7.tar.bz2
* eval.c (evaluate_subexp_for_address): Provide frame address to
locate_var_value only if it will be needed.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/eval.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 803027e..484e57c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-03 Paul N. Hilfinger <hilfinger@adacore.com>
+
+ * eval.c (evaluate_subexp_for_address): Provide frame address to
+ locate_var_value only if it will be needed.
+
2008-01-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-nat.c (linux_child_follow_fork): Call also CHECK_FOR_THREAD_DB.
diff --git a/gdb/eval.c b/gdb/eval.c
index d5c63db..1f84d23 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);