Re: [PATCH] Show optimized out local variables in "info locals"

Yao Qi
2017-11-14T22:44:07Z

On Tue, Nov 14, 2017 at 5:08 PM, Simon Marchi <simon.marchi@ericsson.com> wrote:
>
> However, this change reveals what I think is a bug in GDB, see:
>
> http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2017-September/004394.html
>

IMO, it is not necessary to emit DW_TAG_lexical_block in concrete instances.
See comment #4 in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37801
At least, looks gcc generates unnecessary debug information, and we need
to fix GCC somehow.

Whether it is a bug in GDB or not, I don't know. The answer depends on it is
*unnecessary* or *wrong* to have DW_TAG_lexical_block in concrete instances.

--
Yao (齐尧)