summaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2011-02-14 11:32:16 +0000
committerPedro Alves <pedro@codesourcery.com>2011-02-14 11:32:16 +0000
commitc4f121580815d0d2767fed6906098f1a494472d8 (patch)
tree1cdc9da7256313df17352a1bdb03b9ef0c628a26 /gdb/valops.c
parent727a3a5532e6b18c632a5d404fa9d2bf9a8f4473 (diff)
downloadgdb-c4f121580815d0d2767fed6906098f1a494472d8.tar.gz
gdb/
* valops.c (value_repeat): Use read_value_memory instead of read_memory. gdb/testsuite/ * gdb.trace/unavailable.exp (gdb_collect_globals_test): Test that value repeat handles unavailableness.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 1c37fae46a9..1f25a32720a 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1456,12 +1456,13 @@ value_repeat (struct value *arg1, int count)
val = allocate_repeat_value (value_enclosing_type (arg1), count);
- read_memory (value_address (arg1),
- value_contents_all_raw (val),
- TYPE_LENGTH (value_enclosing_type (val)));
VALUE_LVAL (val) = lval_memory;
set_value_address (val, value_address (arg1));
+ read_value_memory (val, 0, value_stack (val), value_address (val),
+ value_contents_all_raw (val),
+ TYPE_LENGTH (value_enclosing_type (val)));
+
return val;
}