Before this patch
https://sourceware.org/ml/gdb-patches/2014-02/msg00709.html
read_value_memory checks parameter 'stack', and call read_stack or
read_memory respectively. However, 'stack' is not checked and
TARGET_OBJECT_MEMORY is always used in target_xfer_partial, which is
a mistake in the patch above.
This patch checks parameter 'stack', and choose TARGET_OBJECT_MEMORY
or TARGET_OBJECT_STACK_MEMORY accordingly.
gdb:
2016-04-22 Yao Qi <yao.qi@linaro.org>
* valops.c (read_value_memory): New local variable 'stack'.
Set it to either TARGET_OBJECT_STACK_MEMORY or
TARGET_OBJECT_MEMORY.
+2016-04-22 Yao Qi <yao.qi@linaro.org>
+
+ * valops.c (read_value_memory): New local variable 'stack'.
+ Set it to either TARGET_OBJECT_STACK_MEMORY or
+ TARGET_OBJECT_MEMORY.
+
2016-04-22 Pedro Alves <palves@redhat.com>
* ada-exp.y: Remove all yy symbol remappings.
ULONGEST xfered_total = 0;
struct gdbarch *arch = get_value_arch (val);
int unit_size = gdbarch_addressable_memory_unit_size (arch);
+ enum target_object object;
+
+ object = stack ? TARGET_OBJECT_STACK_MEMORY : TARGET_OBJECT_MEMORY;
while (xfered_total < length)
{
ULONGEST xfered_partial;
status = target_xfer_partial (current_target.beneath,
- TARGET_OBJECT_MEMORY, NULL,
+ object, NULL,
buffer + xfered_total * unit_size, NULL,
memaddr + xfered_total,
length - xfered_total,