This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH 04/10] libdw: dwarfstrings.c use known-dwarf.h ALL_KNOWN_DW macros.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 26 Jul 2012 16:08:21 -0700
- Subject: Re: [PATCH 04/10] libdw: dwarfstrings.c use known-dwarf.h ALL_KNOWN_DW macros.
> For dwarf_access_string, dwarf_visibility_string,
> dwarf_virtuality_string, dwarf_identifier_case_string,
> dwarf_calling_convention_string, dwarf_encoding_string,
> dwarf_ordering_string and dwarf_discr_list_string by defining
> the known array because there are no code value gaps.
> For dwarf_tag_string, dwarf_attr_string and dwarf_form_string,
> dwarf_lang_string and dwarf_lang_description which do contain large
> code value gaps use a switch-case statement.
Perhaps the awk script can just notice the values and keep track of whether
there are any large gaps or not. Then it could define a macro for each set
saying so. With that, we can put the entire body of the accessor functions
into one common parameterized file and #include that with a couple of macro
definitions to define each function.