Skip to content
Commit 89ce955a authored by Siva Chandra's avatar Siva Chandra
Browse files

Make array symbol reading resilient to incomplete DWARF.

Summary:
GCC emits DW_TAG_subrange_type for static member arrays, but with no
attributes. This in turn results in wrong type/value of the array when
printing with 'target variable <array var name>'. This patch fixes this
so that the array value is printed in this format:

    (<element type> []) <array var name> = {}

Earlier, the array was being interpreted to be of its element type.

Note: This does not fix anything to do with 'expr' or 'p' commands.
Those commands still error out complaining about incomplete types.

Test Plan: dotest.py -p TestStaticVariables

Reviewers: emaste, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D6799

llvm-svn: 225219
parent d1d5cc27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment