[PATCH 02/12] libctf, include, binutils, gdb: rename CTF-opening functions
Alan Modra
amodra@gmail.com
Tue Nov 17 22:34:11 GMT 2020
On Sun, Oct 25, 2020 at 02:14:03PM +0000, Nick Alcock via Binutils wrote:
> The functions that return ctf_dict_t's given a ctf_archive_t and a name
> are very clumsily named. It sounds like they return *archives*, not
> dictionaries, and the names are very long and clunky. Why do we
> have a ctf_arc_open_by_name when it opens a dictionary, not an archive,
> and when there is no way to open a dictionary in any other way? The
> answer is purely internal: the function is located in ctf-archive.c,
> and everything in there was called ctf_arc_*, and there is another
> way to open a dict (by offset in the archive), that is internal to
> ctf-archive.c and that nothing else can call.
>
> This is clearly bad naming. The internal organization of the source tree
> should not dictate public API names!
>
> So rename things (keeping the old, bad names for compatibility), and
> adjust all users. You now open a dict using ctf_dict_open, and
> open it giving ELF sections via ctf_dict_open_sections.
This is all fine too.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list