This is an archive of the discontinued LLVM Phabricator instance.

Make array symbol reading resilient to incomplete DWARF.
ClosedPublic

Authored by sivachandra on Dec 29 2014, 2:44 PM.

Details

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.

Diff Detail

Event Timeline

sivachandra retitled this revision from to Make array symbol reading resilient to incomplete DWARF..
sivachandra updated this object.
sivachandra edited the test plan for this revision. (Show Details)
sivachandra added reviewers: emaste, clayborg.
sivachandra added a subscriber: Unknown Object (MLST).
clayborg accepted this revision.Jan 5 2015, 1:44 PM
clayborg edited edge metadata.

Back from holiday break, and looks good.

This revision is now accepted and ready to land.Jan 5 2015, 1:44 PM

Thanks for the prompt review. I will put this in shortly.

sivachandra closed this revision.Jan 5 2015, 3:07 PM