This is the mail archive of the gcc-bugs@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]

[Bug debug/48176] .debug_aranges is no longer emitted


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48176

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-18 09:00:59 UTC ---
I believe Eric's change was wrong actually, .debug_aranges section has useful
content even when !arange_table_in_use.  In particular, it describes .text and
.text.unlikely sections.

So IMHO we want:

--- gcc/dwarf2out.c2011-03-17 12:54:51.000000000 +0100
+++ gcc/dwarf2out.c2011-03-18 09:58:06.010366417 +0100
@@ -23664,7 +23664,7 @@ dwarf2out_finish (const char *filename)

   /* Output the address range information.  We only put functions in the
arange
      table, so don't write it out if we don't have any.  */
-  if (arange_table_in_use)
+  if (arange_table_in_use || text_section_used || cold_text_section_used)
     {
       switch_to_section (debug_aranges_section);
       output_aranges ();

I assume .debug_aranges isn't useful when no code has been emitted and after
all, we haven't been emitting it before either.  I'm unsure when exactly
would be fde_table_in_use different from
arange_table_in_use || text_section_used || cold_text_section_used
though.


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