binutils-gdb/ld/testsuite/ld-ctf
Nick Alcock eb5323fdf8 libctf, ld: handle nonrepresentable types better
ctf_type_visit (used, among other things, by the type dumping code) was
aborting when it saw a nonrepresentable type anywhere: even a single
structure member with a nonrepresentable type caused an abort with
ECTF_NONREPRESENTABLE.  This is not useful behaviour, given that the
abort comes from a type-resolution we are only doing in order to
determine whether the type is a structure or union.  We know
nonrepresentable types can't be either, so handle that case and
pass the nonrepresentable type down.

(The added test verifies that the dumper now handles this case and
prints nonrepresentable structure members as it already does
nonrepresentable top-level types, rather than skipping the whole
structure -- or, without the previous commit, skipping the whole types
section.)

ld/ChangeLog
2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/ld-ctf/nonrepresentable-member.*: New test.

libctf/ChangeLog
2021-10-25  Nick Alcock  <nick.alcock@oracle.com>

	* ctf-types.c (ctf_type_rvisit): Handle nonrepresentable types.
2021-10-25 11:17:05 +01:00
..
A-2.c
A.c
array-char.c
array-int.c
array.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
B-2.c
B.c
C-2.c
C.c
child-float.c
child-int.c
conflicting-cycle-1.B-1.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-1.B-2.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-1.parent.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-2.A-1.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-2.A-2.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-2.parent.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-3.C-1.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-3.C-2.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-cycle-3.parent.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-enums.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
conflicting-typedefs.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
cross-tu-1.c
cross-tu-2.c
cross-tu-conflicting-2.c
cross-tu-cyclic-1.c
cross-tu-cyclic-2.c
cross-tu-cyclic-3.c
cross-tu-cyclic-4.c
cross-tu-cyclic-conflicting.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
cross-tu-cyclic-nonconflicting.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
cross-tu-into-cycle.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
cross-tu-noncyclic.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
ctf.exp
cycle-1.c
cycle-1.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
cycle-2.A.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
cycle-2.B.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
cycle-2.C.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
data-func-1.c
data-func-2.c
data-func-conflicted.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
diag-ctf-version-0.d
diag-ctf-version-0.s
diag-ctf-version-2-unsupported-feature.d
diag-ctf-version-2-unsupported-feature.s
diag-ctf-version-f.d
diag-ctf-version-f.s
diag-cttname-invalid.d
diag-cttname-invalid.s
diag-cttname-null.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
diag-cttname-null.s
diag-cuname.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
diag-cuname.s
diag-decompression-failure.d
diag-decompression-failure.s
diag-parlabel.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
diag-parlabel.s
diag-parname.d
diag-parname.s
diag-unsupported-flag.d
diag-unsupported-flag.s
diag-wrong-magic-number-mixed.d
diag-wrong-magic-number.d
diag-wrong-magic-number.s
enum-2.c
enum-forward.c
enum-forward.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
enum.c
enums.c
enums.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
forward.c
forward.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
function.c
function.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
nonrepresentable-1.c
nonrepresentable-2.c
nonrepresentable-member.c libctf, ld: handle nonrepresentable types better 2021-10-25 11:17:05 +01:00
nonrepresentable-member.d libctf, ld: handle nonrepresentable types better 2021-10-25 11:17:05 +01:00
nonrepresentable.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
slice.c
slice.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
super-sub-cycles.c
super-sub-cycles.d binutils, ld: make objdump --ctf's parameter optional 2021-10-25 11:17:03 +01:00
typedef-int.c
typedef-long.c
union-1.c