diff options
author | Mark Harmstone <mark@harmstone.com> | 2025-08-29 20:43:57 +0100 |
---|---|---|
committer | Mark Harmstone <mark@harmstone.com> | 2025-09-01 21:58:44 +0100 |
commit | 3b3f336af29c6f25b7ded05ae037b5ab57b2ae67 (patch) | |
tree | fb5c376db1fb9a4e4b70b4d946adedeac2ad3213 /gcc/go | |
parent | 70954659527858fc9ffa2655b0dd5265c2453be8 (diff) | |
download | gcc-3b3f336af29c6f25b7ded05ae037b5ab57b2ae67.zip gcc-3b3f336af29c6f25b7ded05ae037b5ab57b2ae67.tar.gz gcc-3b3f336af29c6f25b7ded05ae037b5ab57b2ae67.tar.bz2 |
Fix assertion when trying to represent Ada arrays in CodeView
The LF_ARRAY CodeView type represents a C- or C++-style array, which a
length known at compile time. We were crashing when using -gcodeview
with Ada (bug #121157), as the DW_AT_upper_bound value is not an
unsigned integer but something more complicated:
0x00000123: DW_TAG_array_type
DW_AT_type (0x0000014d "character")
DW_AT_sibling (0x00000142)
0x0000012c: DW_TAG_subrange_type
DW_AT_type (0x00000142 "integer")
DW_AT_lower_bound (DW_OP_push_object_address, DW_OP_plus_uconst 0x8, DW_OP_deref, DW_OP_deref_size 0x4)
DW_AT_upper_bound (DW_OP_push_object_address, DW_OP_plus_uconst 0x8, DW_OP_deref, DW_OP_plus_uconst 0x4, DW_OP_deref_size 0x4)
It doesn't look like we can represent Ada arrays in CodeView, so return
0 in get_type_num_array_type so that they come through as an unknown
type.
gcc/
* dwarf2codeview.cc (get_type_num_array_type): Don't try to
encode non-C-style arrays.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions