1 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
3 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
6 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
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
23 * testsuite/libctf-regression/regression.exp: New testsuite for
25 * testsuite/libctf-regression/pptrtab*: New test.
26 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
28 * testsuite/libctf-writable/pptrtab*: New test.
30 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
32 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
34 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
36 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
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
53 * testsuite/libctf-lookup/struct-lookup.c: New test.
54 * testsuite/libctf-lookup/struct-lookup.lk: New test.
56 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
58 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
59 (ctf_link_write): Call it.
61 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
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.
67 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
69 * Makefile.am (EXPECT): New.
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.
84 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
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
91 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
93 (libctf_la_LIBADD): Reference libbfd.la directly, not via
95 (libctf_la_DEPENDENCIES): Remove.
96 * Makefile.in: Regenerate.
97 * configure: Likewise.
99 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
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.
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.
122 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
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
133 (ctf_dump_member): Do not try to print their alignment.
135 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
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
142 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
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
154 2021-01-05 Nick Alcock <nick.alcock@oracle.com>
156 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
158 2021-01-04 Nicolas Boulenguez <nicolas@debian.org>
161 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
162 ACLOCAL_AMFLAGS -I dirs.
163 * configure: Regenerate.
165 2021-01-01 Alan Modra <amodra@gmail.com>
167 Update year range in copyright notice of all files.
169 For older changes see ChangeLog-2020
171 Copyright (C) 2021 Free Software Foundation, Inc.
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.
181 version-control: never