This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Choose TARGET_OBJECT_STACK_MEMORY and TARGET_OBJECT_MEMORY in read_value_memory
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Fri, 22 Apr 2016 16:53:48 +0100
- Subject: Re: [PATCH] Choose TARGET_OBJECT_STACK_MEMORY and TARGET_OBJECT_MEMORY in read_value_memory
- Authentication-results: sourceware.org; auth=none
- References: <1461059620-27870-1-git-send-email-yao dot qi at linaro dot org>
On 04/19/2016 10:53 AM, Yao Qi wrote:
> 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-19 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.
LGTM.
Thanks,
Pedro Alves