This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fetch lazy value before calling val_print
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 3 Mar 2017 17:17:19 +0000
- Subject: Re: [PATCH] Fetch lazy value before calling val_print
- Authentication-results: sourceware.org; auth=none
- References: <1487870000-24345-1-git-send-email-yao.qi@linaro.org>
On Thu, Feb 23, 2017 at 5:13 PM, Yao Qi <qiyaoltc@gmail.com> wrote:
> As reported in PR 21165,
>
> (gdb) info locals^M
> gv = /home/yao/SourceCode/gnu/gdb/git/gdb/value.c:372: internal-error: int value_bits_any_optimized_out(const value*, int, int): Assertion `!value->lazy' failed.^M
> A problem internal to GDB has been detected,^M
> further debugging may prove unreliable.^M
> Quit this debugging session? (y or n) FAIL: gdb.ada/info_locals_renaming.exp: info locals (GDB internal error)
> Resyncing due to internal error.
>
> This internal error is caused by e8b24d9 (Remove parameter valaddr from
> la_val_print). Commit e8b24d9 removes some calls to
> value_contents_for_printing, but value_fetch_lazy is not called, so the
> internal error above is triggered. This patch adds value_fetch_lazy
> call before val_print.
>
> Regression tested on x86_64-linux.
>
> gdb:
>
> 2017-02-23 Yao Qi <yao.qi@linaro.org>
>
> PR gdb/21165
> * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
> value is lazy.
> * valprint.c (common_val_print): Likewise.
I pushed it in.
--
Yao (齐尧)