]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Calculate size of array of stubbed type
authorHannes Domani <ssbssa@yahoo.de>
Mon, 27 Apr 2020 11:14:24 +0000 (13:14 +0200)
committerHannes Domani <ssbssa@yahoo.de>
Thu, 30 Apr 2020 16:20:16 +0000 (18:20 +0200)
commitee9d1e5f76033cd8432713a76381ade76697df04
treef5651b71bd5710d1e475e63cb96717ff2188eed2
parentd5cf82c0d7a7b13727a2f26425afc9051656a716
Calculate size of array of stubbed type

Sizes of stubbed types are calculated on demand in check_typedef, so the
same must also be done for arrays of stubbed types.

A stubbed type is usually a structure that has only been forward declared,
but can also happen if the structure has a virtual function that's not
inline in the class definition.

For these stubbed types, the size must be recalculated once the full
definition is available.

gdb/ChangeLog:

2020-04-30  Hannes Domani  <ssbssa@yahoo.de>

PR gdb/18706
* gdbtypes.c (check_typedef): Calculate size of array of
stubbed type.

gdb/testsuite/ChangeLog:

2020-04-30  Hannes Domani  <ssbssa@yahoo.de>

PR gdb/18706
* gdb.cp/stub-array-size.cc: New test.
* gdb.cp/stub-array-size.exp: New file.
* gdb.cp/stub-array-size.h: New test.
* gdb.cp/stub-array-size2.cc: New test.
gdb/ChangeLog
gdb/gdbtypes.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/stub-array-size.cc [new file with mode: 0644]
gdb/testsuite/gdb.cp/stub-array-size.exp [new file with mode: 0644]
gdb/testsuite/gdb.cp/stub-array-size.h [new file with mode: 0644]
gdb/testsuite/gdb.cp/stub-array-size2.cc [new file with mode: 0644]