libctf, ld: fix formatting of forwards to unions and enums
[deliverable/binutils-gdb.git] / libctf / ChangeLog
1 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
4 properly.
5
6 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
7
8 * ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
9 <ctf_pptrtab_len>: New.
10 <ctf_pptrtab_typemax>: New.
11 * ctf-create.c (ctf_serialize): Update accordingly.
12 (ctf_add_reftype): Note that we don't need to update pptrtab here,
13 despite updating ptrtab.
14 * ctf-open.c (ctf_dict_close): Destroy the pptrtab.
15 (ctf_import): Likewise.
16 (ctf_import_unref): Likewise.
17 * ctf-lookup.c (grow_pptrtab): New.
18 (refresh_pptrtab): New, update a pptrtab.
19 (ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
20 (ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
21 use it in addition to the parent's ptrtab when parent dicts are
22 searched.
23 * testsuite/libctf-regression/regression.exp: New testsuite for
24 regression tests.
25 * testsuite/libctf-regression/pptrtab*: New test.
26 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
27 writable CTF dicts.
28 * testsuite/libctf-writable/pptrtab*: New test.
29
30 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
31
32 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
33
34 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
35
36 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
37 <ctn_next>: ... here.
38 * ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
39 * ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
40 * ctf-types.c (ctf_member_iter): Reimplement in terms of...
41 (ctf_member_next): ... this. Support recursive unnamed member
42 iteration (off by default).
43 (ctf_member_info): Look up members in unnamed sub-structs.
44 * ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
45 (ctf_dedup_emit_struct_members): Likewise.
46 * testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
47 members, and a normal member after the end.
48 * testsuite/libctf-lookup/struct-iteration.c: Verify that
49 ctf_member_count is consistent with the number of successful returns
50 from a non-recursive ctf_member_next.
51 * testsuite/libctf-lookup/struct-iteration-*: New, test iteration
52 over struct members.
53 * testsuite/libctf-lookup/struct-lookup.c: New test.
54 * testsuite/libctf-lookup/struct-lookup.lk: New test.
55
56 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
57
58 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
59 (ctf_link_write): Call it.
60
61 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
62
63 * testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
64 * testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
65 * testsuite/libctf-lookup/enum-symbol.c: New lookup test.
66
67 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
68
69 * Makefile.am (EXPECT): New.
70 (RUNTEST): Likewise.
71 (RUNTESTFLAGS): Likewise.
72 (CC_FOR_TARGET): Likewise.
73 (check-DEJAGNU): Likewise.
74 (AUTOMAKE_OPTIONS): Add dejagnu.
75 * Makefile.in: Regenerated.
76 * testsuite/config/default.exp: New.
77 * testsuite/lib/ctf-lib.exp: Likewise.
78 * testsuite/libctf-lookup/enum.lk: New test.
79 * testsuite/libctf-lookup/enum-ctf.c: New CTF input.
80 * testsuite/libctf-lookup/enum.c: New lookup test.
81 * testsuite/libctf-lookup/ambiguous-struct*.c: New test.
82 * testsuite/libctf-lookup/lookup.exp: New.
83
84 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
85
86 * configure.ac (BFD_LIBADD): Remove.
87 (BFD_DEPENDENCIES): Likewise. Remove associated cases.
88 (SHARED_LIBADD): Rename to...
89 (CTF_LIBADD): ... this. Stick in a suitable libiberty even when
90 linking statically.
91 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
92 libctf uses libintl.
93 (libctf_la_LIBADD): Reference libbfd.la directly, not via
94 BFD_LIBADD.
95 (libctf_la_DEPENDENCIES): Remove.
96 * Makefile.in: Regenerate.
97 * configure: Likewise.
98
99 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
100
101 * ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
102 * ctf-types.c (ctf_type_aname): No longer deal with slices here.
103 * ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
104 (CTF_FT_REFS): New.
105 (CTF_FT_BITFIELD): Likewise.
106 (CTF_FT_ID): Likewise.
107 (ctf_dump_member): Do not do indentation here. Migrate the
108 type-printing parts of this into...
109 (ctf_dump_format_type): ... here, to be shared by all type printers.
110 Get the errno value for non-representable types right. Do not print
111 bitfield info for non-bitfields. Improve the format and indentation
112 of other type output. Shuffle spacing around to make all indentation
113 either 'width of column' or 4 chars.
114 (ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
115 (ctf_dump_objts): Likewise. Spacing shuffle.
116 (ctf_dump_var): Likewise.
117 (type_hex_digits): Migrate down in the file, to above its new user.
118 (ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
119 ctf_dump_format_type. Don't trim off excess linefeeds now we no
120 longer generate them. Dump enumerated types.
121
122 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
123
124 * ctf-types.c (ctf_type_resolve): Improve comment.
125 (ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
126 Emit errors into the right dict.
127 (ctf_type_align): Likewise.
128 * ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
129 when adding a member without explicit offset when this member, or
130 the previous member, is incomplete.
131 * ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
132 forwards.
133 (ctf_dump_member): Do not try to print their alignment.
134
135 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
136
137 * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
138 (ctf_dump_format_type): Don't emit the size for function objects.
139 Dump the element type of arrays like we dump the pointed-to type of
140 pointers, etc.
141
142 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
143
144 * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
145 (ctf_dump_header): Add 0x to the hex magic number.
146 (ctf_dump_str): Add 0x to the hex string offsets.
147 (ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
148 (ctf_dump_type): Adjust. Free it when we're done.
149 (type_hex_digits): New.
150 (ctf_dump_member): Align output depending on the width of the type
151 ID being generated. Use printf padding, not a loop, to generate
152 indentation.
153
154 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
155
156 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
157
158 2021-01-04 Nicolas Boulenguez <nicolas@debian.org>
159
160 PR 27117
161 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
162 ACLOCAL_AMFLAGS -I dirs.
163 * configure: Regenerate.
164
165 2021-01-01 Alan Modra <amodra@gmail.com>
166
167 Update year range in copyright notice of all files.
168
169 For older changes see ChangeLog-2020
170 \f
171 Copyright (C) 2021 Free Software Foundation, Inc.
172
173 Copying and distribution of this file, with or without modification,
174 are permitted in any medium without royalty provided the copyright
175 notice and this notice are preserved.
176
177 Local Variables:
178 mode: change-log
179 left-margin: 8
180 fill-column: 74
181 version-control: never
182 End:
This page took 0.033081 seconds and 5 git commands to generate.