]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf: ctf-link: minor comment improvements
authorNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 20:05:02 +0000 (21:05 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 20:23:07 +0000 (21:23 +0100)
libctf/ctf-impl.h
libctf/ctf-link.c

index 49e8ff32bc07df80cae1d3381829b0db30d1d220..92b57b33dfa8e7683a64dde141e72f0c5660cc19 100644 (file)
@@ -333,8 +333,7 @@ typedef struct ctf_dedup
   ctf_dynhash_t *cd_citers;
 
   /* Maps type hash values to input global type IDs.  The value is a set (a
-     hash) of global type IDs.  Discarded before each rehashing.  The result of
-     the ctf_dedup function.  */
+     hash) of global type IDs.  The result of the ctf_dedup function.  */
   ctf_dynhash_t *cd_output_mapping;
 
   /* A map giving the GID of the first appearance of each type for each type
index 1377251177b39439de8930d3660f96e83fa3b639..d7927a45dcaf6f45416e8afd1dc75aed9a2e8670 100644 (file)
@@ -487,7 +487,9 @@ ctf_link_set_memb_name_changer (ctf_dict_t *fp,
   fp->ctf_link_memb_name_changer_arg = arg;
 }
 
-/* Set a function which is used to filter out unwanted variables from the link.  */
+/* Set a function which is used to filter out unwanted variables from the link.
+
+   UPTODO: call this somewhere (ctf-dedup, probably). */
 int
 ctf_link_set_variable_filter (ctf_dict_t *fp, ctf_link_variable_filter_f *filter,
                              void *arg)
@@ -544,9 +546,9 @@ ctf_link_sort_inputs (const ctf_next_hkv_t *one, const ctf_next_hkv_t *two,
 }
 
 /* Count the number of input dicts in the ctf_link_inputs, or that subset of the
-   ctf_link_inputs given by CU_NAMES if set.  Return the number of input dicts,
-   and optionally the name and ctf_link_input_t of the single input archive if
-   only one exists (no matter how many dicts it contains).  */
+   ctf_link_inputs given by CU_NAMES if set: open them if need be.  Return the number
+   of input dicts, and optionally the name and ctf_link_input_t of the single input
+   archive if only one exists (no matter how many dicts it contains).  */
 static ssize_t
 ctf_link_deduplicating_count_inputs (ctf_dict_t *fp, ctf_dynhash_t *cu_names,
                                     ctf_link_input_t **only_one_input)
@@ -1016,6 +1018,9 @@ ctf_link_deduplicating_per_cu (ctf_dict_t *fp)
       uint32_t noutputs;
       uint32_t *parents;
 
+      ctf_dprintf ("ctf_link_deduplicating_per_cu: deduplicating into %s\n",
+                  out_name);
+
       if ((ninputs = ctf_link_deduplicating_count_inputs (fp, in,
                                                          &only_input)) == -1)
        goto err_open_inputs;