]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf: don't include cv-quals or pointers in the name table
authorNick Alcock <nick.alcock@oracle.com>
Wed, 5 Mar 2025 19:01:12 +0000 (19:01 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Sun, 16 Mar 2025 15:25:28 +0000 (15:25 +0000)
Even if these types have a name recorded against them, we should
ignore it.  They don't have names, full stop.

libctf/ChangeLog:
* ctf-open.c (init_static_types): Drop nameless types when sizing
the name table.
(init_static_types_names_internal): Never pass in their name.

libctf/ctf-open.c

index 8701546ef79f240a84ab72b5562a5a69303857f3..600fd8a21926b306fb740fdb8f140d7db9c40e6b 100644 (file)
@@ -818,10 +818,6 @@ init_static_types (ctf_dict_t *fp, ctf_header_t *cth)
                                   pop[CTF_K_FLOAT] +
                                   pop[CTF_K_FUNCTION] +
                                   pop[CTF_K_TYPEDEF] +
-                                  pop[CTF_K_POINTER] +
-                                  pop[CTF_K_VOLATILE] +
-                                  pop[CTF_K_CONST] +
-                                  pop[CTF_K_RESTRICT] +
                                   pop_enumerators,
                                   ctf_hash_string,
                                   ctf_hash_eq_string,
@@ -1102,8 +1098,7 @@ init_static_types_names_internal (ctf_dict_t *fp, ctf_header_t *cth,
            break;
 
          err = ctf_dynhash_insert_type (fp, fp->ctf_names,
-                                        ctf_index_to_type (fp, id),
-                                        tp->ctt_name);
+                                        ctf_index_to_type (fp, id), 0);
          if (err != 0)
            return err * -1;
          break;