aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-impl.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-10-21 11:27:43 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-06-26 15:56:39 +0100
commitfe4c2d55634c700ba527ac4183e05c66e9f93c62 (patch)
tree67eeb7d1fa76d860f2d2473eddc9c7f4533cc6c9 /libctf/ctf-impl.h
parent094e34f22146ad53eb93da22e480cab428bd23b5 (diff)
downloadgdb-fe4c2d55634c700ba527ac4183e05c66e9f93c62.zip
gdb-fe4c2d55634c700ba527ac4183e05c66e9f93c62.tar.gz
gdb-fe4c2d55634c700ba527ac4183e05c66e9f93c62.tar.bz2
libctf: create: non-root-visible types should not appear in name tables
We were accidentally interning newly-added and newly-opened non-root-visible types into name tables, and removing names from name tables when such types were removed. This is very wrong: the whole point of non-root-visible types is they do not go in name tables and cannot be looked up by name. This bug made non-root-visible types basically identical to root-visible types, right back to the earliest days of libctf in the Solaris era. libctf/ * ctf-open.c (init_types): Only intern root-visible types. * ctf-create.c (ctf_dtd_insert): Likewise. (ctf_dtd_delete): Only remove root-visible types. (ctf_rollback): Likewise. (ctf_add_generic): Adjust. (ctf_add_struct_sized): Adjust comment. (ctf_add_union_sized): Likewise. (ctf_add_enum): Likewise. * ctf-impl.h (ctf_dtd_insert): Adjust prototype.
Diffstat (limited to 'libctf/ctf-impl.h')
-rw-r--r--libctf/ctf-impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index 267801d..56ef9a3 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -399,7 +399,7 @@ extern void ctf_list_prepend (ctf_list_t *, void *);
extern void ctf_list_delete (ctf_list_t *, void *);
extern int ctf_list_empty_p (ctf_list_t *lp);
-extern int ctf_dtd_insert (ctf_file_t *, ctf_dtdef_t *, int);
+extern int ctf_dtd_insert (ctf_file_t *, ctf_dtdef_t *, int flag, int kind);
extern void ctf_dtd_delete (ctf_file_t *, ctf_dtdef_t *);
extern ctf_dtdef_t *ctf_dtd_lookup (const ctf_file_t *, ctf_id_t);
extern ctf_dtdef_t *ctf_dynamic_type (const ctf_file_t *, ctf_id_t);