mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-12 12:16:04 +08:00
91e7ce2fd7
Dump more details about the types found in data object and function info sections (the type ID and recursive info on the type itself, but not on its members). Before now, this was being dumped for entries in the variable section, but not for the closely-related function info and data object sections, which is inconsistent and makes finding the corresponding types in the type section unnecessarily hard. (This also gets rid of code in which bugs have already been found in favour of the same code everything else in the dumper uses to dump types.) While we're doing that, change the recursive type dumper in question to recursively dump info on arrays' element type, just as we do for all types that reference other types. (Arrays are not a kind of reference type in libctf, but perhaps we should change that in future and make ctf_type_reference return the element type.) ld/ChangeLog 2021-01-05 Nick Alcock <nick.alcock@oracle.com> * testsuite/ld-ctf/array.d: Adjust for dumper changes. * testsuite/ld-ctf/data-func-conflicted.d: Likewise. * testsuite/ld-ctf/diag-cttname-null.d: Likewise. * testsuite/ld-ctf/diag-cuname.d: Likewise. * testsuite/ld-ctf/diag-parlabel.d: Likewise. * testsuite/ld-ctf/function.d: Likewise. * testsuite/ld-ctf/slice.d: Likewise. libctf/ChangeLog 2021-01-05 Nick Alcock <nick.alcock@oracle.com> * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type. (ctf_dump_format_type): Don't emit the size for function objects. Dump the element type of arrays like we dump the pointed-to type of pointers, etc.
33 lines
1.0 KiB
Makefile
33 lines
1.0 KiB
Makefile
#as:
|
|
#source: slice.c
|
|
#objdump: --ctf=.ctf
|
|
#ld: -shared --ctf-variables
|
|
#name: Slice
|
|
|
|
.*: +file format .*
|
|
|
|
Contents of CTF section .ctf:
|
|
|
|
Header:
|
|
Magic number: 0xdff2
|
|
Version: 4 \(CTF_VERSION_3\)
|
|
#...
|
|
Compilation unit name: .*slice.c
|
|
#...
|
|
Data object section: .* \(0x4 bytes\)
|
|
Type section: .* \(0x9c bytes\)
|
|
String section: .*
|
|
#...
|
|
Data objects:
|
|
slices -> 0x[0-9a-f]*: struct slices \(size 0x[0-9a-f]*\)
|
|
#...
|
|
Types:
|
|
#...
|
|
0x[0-9a-f]*: struct slices \(size 0x[0-9a-f]*\)
|
|
*\[0x0\] \(ID 0x[0-9a-f]*\) \(kind 6\) struct slices \(aligned at 0x1\)
|
|
*\[0x0\] \(ID 0x[0-9a-f]*\) \(kind 1\) int one:1 \(aligned at 0x1, format 0x1, offset:bits 0x0:0x1\)
|
|
*\[0x1\] \(ID 0x[0-9a-f]*\) \(kind 1\) int two:2 \(aligned at 0x1, format 0x1, offset:bits 0x1:0x2\)
|
|
*\[0x3\] \(ID 0x[0-9a-f]*\) \(kind 1\) int six:6 \(aligned at 0x1, format 0x1, offset:bits 0x3:0x6\)
|
|
*\[0x9\] \(ID 0x[0-9a-f]*\) \(kind 1\) int ten:10 \(aligned at 0x2, format 0x1, offset:bits 0x9:0xa\)
|
|
#...
|