This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Emit .debug_str and DW_FORM_strp where appropriate


On Thu, Nov 08, 2001 at 12:09:58PM -0500, Jakub Jelinek wrote:
> +/* If assembler supports SHF_MERGE, we want strings in .debug_str section
> +   merged.  */
> +
> +#ifdef HAVE_GAS_SHF_MERGE
> +#define DEBUG_STR_SECTION_FLAGS \
> +  (SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1)
> +#endif

Any reason not to have this in dwarf2out.c?

> +  /* If we emitted any DW_FORM_strp form attribute, output string
> +     table too.  */
> +  if (debug_str_hash)
> +    ht_forall (debug_str_hash, output_indirect_string, NULL);

Perhaps move the named_section_flags call here outside the loop?
Or perhaps make the argument be 

  if (debug_str_hash)
    {
      bool changed_section = false;
      ht_forall (debug_str_hash, output_indirect_string, &changed_section);
    }

  ...

  if (!*changed_section_p)
    {
      *changed_section_p = true;
      named_section (...);
    }


Otherwise it looks good.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]