aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-12-07 07:35:10 +0100
committerTom de Vries <tdevries@suse.de>2021-12-07 07:35:10 +0100
commitaf5300fe24bf2f4e032d639a5396a16c1762b77b (patch)
treeacb82164c5b42fd2c38930ab2b61dc9eb64e322b /gdb/testsuite
parentd91c67e8730354c43fae86fa98fe593925882365 (diff)
downloadgdb-af5300fe24bf2f4e032d639a5396a16c1762b77b.zip
gdb-af5300fe24bf2f4e032d639a5396a16c1762b77b.tar.gz
gdb-af5300fe24bf2f4e032d639a5396a16c1762b77b.tar.bz2
[gdb/ada] Fix assert in ada_is_unconstrained_packed_array_type
On openSUSE Leap 42.3, with system compiler gcc 4.8.5 I run into: ... (gdb) print u_one_two_three^M src/gdb/gdbtypes.h:1050: internal-error: field: \ Assertion `idx >= 0 && idx < num_fields ()' failed.^M ... We run into trouble while doing this in ada_is_unconstrained_packed_array_type: ... 1953 return TYPE_FIELD_BITSIZE (type, 0) > 0; ... which tries to get field 0 from a type without fields: ... (gdb) p type->num_fields () $6 = 0 ... which is the case because the type is a typedef: ... (gdb) p type->code () $7 = TYPE_CODE_TYPEDEF ... Fix this by using the type referenced by the typedef instead. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28323
Diffstat (limited to 'gdb/testsuite')
0 files changed, 0 insertions, 0 deletions