aboutsummaryrefslogtreecommitdiff
path: root/libctf/ChangeLog
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-07-13 21:31:26 +0100
committerNick Alcock <nick.alcock@oracle.com>2019-10-03 17:04:55 +0100
commit886453cbbc86ba63d8ab1264e9684a7698243eeb (patch)
tree77880fc8d6e8c2342b6c45f8de49a4058433c89c /libctf/ChangeLog
parent72c83edd92ef15a19ed0c033e25bb5006ee3bdd8 (diff)
downloadgdb-886453cbbc86ba63d8ab1264e9684a7698243eeb.zip
gdb-886453cbbc86ba63d8ab1264e9684a7698243eeb.tar.gz
gdb-886453cbbc86ba63d8ab1264e9684a7698243eeb.tar.bz2
libctf: map from old to corresponding newly-added types in ctf_add_type
This lets you call ctf_type_mapping (dest_fp, src_fp, src_type_id) and get told what type ID the corresponding type has in the target ctf_file_t. This works even if it was added by a recursive call, and because it is stored in the target ctf_file_t it works even if we had to add one type to multiple ctf_file_t's as part of conflicting type handling. We empty out this mapping after every archive is linked: because it maps input to output fps, and we only visit each input fp once, its contents are rendered entirely useless every time the source fp changes. v3: add several missing mapping additions. Add ctf_dynhash_empty, and empty after every input archive. v5: fix tabdamage. libctf/ * ctf-impl.h (ctf_file_t): New field ctf_link_type_mapping. (struct ctf_link_type_mapping_key): New. (ctf_hash_type_mapping_key): Likewise. (ctf_hash_eq_type_mapping_key): Likewise. (ctf_add_type_mapping): Likewise. (ctf_type_mapping): Likewise. (ctf_dynhash_empty): Likewise. * ctf-open.c (ctf_file_close): Update accordingly. * ctf-create.c (ctf_update): Likewise. (ctf_add_type): Populate the mapping. * ctf-hash.c (ctf_hash_type_mapping_key): Hash a type mapping key. (ctf_hash_eq_type_mapping_key): Check the key for equality. (ctf_dynhash_insert): Fix comment typo. (ctf_dynhash_empty): New. * ctf-link.c (ctf_add_type_mapping): New. (ctf_type_mapping): Likewise. (empty_link_type_mapping): New. (ctf_link_one_input_archive): Call it.
Diffstat (limited to 'libctf/ChangeLog')
-rw-r--r--libctf/ChangeLog21
1 files changed, 21 insertions, 0 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 959a038..7dc32b8 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,5 +1,26 @@
2019-07-13 Nick Alcock <nick.alcock@oracle.com>
+ * ctf-impl.h (ctf_file_t): New field ctf_link_type_mapping.
+ (struct ctf_link_type_mapping_key): New.
+ (ctf_hash_type_mapping_key): Likewise.
+ (ctf_hash_eq_type_mapping_key): Likewise.
+ (ctf_add_type_mapping): Likewise.
+ (ctf_type_mapping): Likewise.
+ (ctf_dynhash_empty): Likewise.
+ * ctf-open.c (ctf_file_close): Update accordingly.
+ * ctf-create.c (ctf_update): Likewise.
+ (ctf_add_type): Populate the mapping.
+ * ctf-hash.c (ctf_hash_type_mapping_key): Hash a type mapping key.
+ (ctf_hash_eq_type_mapping_key): Check the key for equality.
+ (ctf_dynhash_insert): Fix comment typo.
+ (ctf_dynhash_empty): New.
+ * ctf-link.c (ctf_add_type_mapping): New.
+ (ctf_type_mapping): Likewise.
+ (empty_link_type_mapping): New.
+ (ctf_link_one_input_archive): Call it.
+
+2019-07-13 Nick Alcock <nick.alcock@oracle.com>
+
* ctf-link.c: New file, linking of the string and type sections.
* Makefile.am (libctf_a_SOURCES): Add it.
* Makefile.in: Regenerate.