From: Nick Alcock Date: Fri, 25 Apr 2025 20:05:02 +0000 (+0100) Subject: libctf: ctf-link: minor comment improvements X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3aacd0f9c00bdc425d306b5de05c65b78dad944a;p=thirdparty%2Fbinutils-gdb.git libctf: ctf-link: minor comment improvements --- diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h index 49e8ff32bc0..92b57b33dfa 100644 --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -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 diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c index 1377251177b..d7927a45dca 100644 --- a/libctf/ctf-link.c +++ b/libctf/ctf-link.c @@ -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;