public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues
@ 2011-03-23 13:08 jakub at gcc dot gnu.org
  2011-03-23 13:11 ` [Bug debug/48253] " jakub at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-23 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6/4.7 Regression] Further .debug_aranges issues
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: jakub@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: tromey@gcc.gnu.org, jan.kratochvil@redhat.com


Created attachment 23756
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23756
aranges.c

As following testcases show, while PR48176 fixed some .debug_aranges related
regressions, with the addition of .text.startup and .text.exit sections we
still sometimes don't emit .debug_aranges covering all the code snippets for a
particular CU.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug debug/48253] [4.6/4.7 Regression] Further .debug_aranges issues
  2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
@ 2011-03-23 13:11 ` jakub at gcc dot gnu.org
  2011-03-23 14:49 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-23 13:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-23 13:01:54 UTC ---
Created attachment 23757
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23757
aranges2.c

Another testcase, this one needs profile feedback (i.e. run compile/link
first with the options and -fprofile-generate, run, compile again with
-fprofile-use).

On this testcase we can see other bugs, e.g. DW_AT_ranges for f1
DW_TAG_subprogram is wrong, it covers twice the same range, once perhaps with a
few extra bytes of padding before it, and then not at all the cold part.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug debug/48253] [4.6/4.7 Regression] Further .debug_aranges issues
  2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
  2011-03-23 13:11 ` [Bug debug/48253] " jakub at gcc dot gnu.org
@ 2011-03-23 14:49 ` jakub at gcc dot gnu.org
  2011-03-24 16:34 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-23 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-23 13:25:04 UTC ---
Created attachment 23758
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23758
gcc46-pr48253.patch

Untested fix.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug debug/48253] [4.6/4.7 Regression] Further .debug_aranges issues
  2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
  2011-03-23 13:11 ` [Bug debug/48253] " jakub at gcc dot gnu.org
  2011-03-23 14:49 ` jakub at gcc dot gnu.org
@ 2011-03-24 16:34 ` rguenth at gcc dot gnu.org
  2011-03-29  2:31 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-24 16:34 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug debug/48253] [4.6/4.7 Regression] Further .debug_aranges issues
  2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-03-24 16:34 ` rguenth at gcc dot gnu.org
@ 2011-03-29  2:31 ` jakub at gcc dot gnu.org
  2011-03-29 20:30 ` [Bug debug/48253] [4.6 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-29  2:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-28 23:55:49 UTC ---
Author: jakub
Date: Mon Mar 28 23:55:47 2011
New Revision: 171642

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171642
Log:
    PR debug/48253
    * dwarf2out.c (struct dw_fde_struct): Remove dw_fde_hot_section_label,
    dw_fde_hot_section_end_label, dw_fde_unlikely_section_label,
    dw_fde_unlikely_section_end_label, cold_in_std_section,
    dw_fde_switched_sections and dw_fde_switched_cold_to_hot fields.
    Add dw_fde_second_begin, dw_fde_second_end and second_in_std_section
    fields.
    (output_fde): Use dw_fde_second_{begin,end} if second is
    true, otherwise dw_fde_{begin,end}.
    (output_call_frame_info): Test dw_fde_second_begin != NULL
    instead of dw_fde_switched_sections.
    (dwarf2out_begin_prologue): Stop initializing removed dw_fde_struct
    fields, initialize new fields.  Initialize in_std_section
    unconditionally from the first partition.
    (dwarf2out_end_epilogue): Don't override dw_fde_end when
    dw_fde_second_begin is non-NULL.
    (dwarf2out_switch_text_section): Stop initializing removed
    dw_fde_struct fields, initialize new fields, initialize
    also dw_fde_end here.  Set dw_fde_switch_cfi even when
    dwarf2out_do_cfi_asm ().  Call var_location_switch_text_section.
    (struct var_loc_list_def): Add last_before_switch field.
    (arange_table, arange_table_allocated, arange_table_in_use,
    ARANGE_TABLE_INCREMENT, add_arange): Removed.
    (size_of_aranges): Count !in_std_section and !second_in_std_section
    hunks in fdes, instead of looking at arange_table_in_use.
    (output_aranges): Add aranges_length argument, don't call
    size_of_aranges here.  Instead of using aranges_table*
    emit ranges for fdes when !in_std_section resp.
    !second_in_std_section.
    (dw_loc_list): Break ranges crossing section switch.
    (convert_cfa_to_fb_loc_list): Likewise.  If switched sections,
    use dw_fde_second_end instead of dw_fde_end as end of last
    range.
    (gen_subprogram_die): Don't call add_arange.  Use
    dw_fde_{begin,end} for first partition and if switched
    section dw_fde_second_{begin,end} for the second.
    (var_location_switch_text_section_1,
    var_location_switch_text_section): New functions.
    (dwarf2out_begin_function): Initialize cold_text_section even
    when function_section () isn't text_section.
    (prune_unused_types): Don't walk arange_table.
    (dwarf2out_finish): Don't needlessly test
    flag_reorder_blocks_and_partition when testing cold_text_section_used.
    If info_section_emitted, call size_of_aranges and if it indicates
    non-empty .debug_aranges, call output_aranges with the computed
    size.  Stop using removed dw_fde_struct fields, use
    dw_fde_{begin,end} for first partition and dw_fde_second_{begin,end}
    for second.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug debug/48253] [4.6 Regression] Further .debug_aranges issues
  2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-03-29  2:31 ` jakub at gcc dot gnu.org
@ 2011-03-29 20:30 ` jakub at gcc dot gnu.org
  2011-03-29 22:56 ` jakub at gcc dot gnu.org
  2011-03-30  0:07 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-29 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.03.29 20:11:32
            Summary|[4.6/4.7 Regression]        |[4.6 Regression] Further
                   |Further .debug_aranges      |.debug_aranges issues
                   |issues                      |
     Ever Confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-29 20:11:32 UTC ---
Fixed on the trunk so far.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug debug/48253] [4.6 Regression] Further .debug_aranges issues
  2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-03-29 20:30 ` [Bug debug/48253] [4.6 " jakub at gcc dot gnu.org
@ 2011-03-29 22:56 ` jakub at gcc dot gnu.org
  2011-03-30  0:07 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-29 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-29 22:48:13 UTC ---
Author: jakub
Date: Tue Mar 29 22:47:59 2011
New Revision: 171702

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171702
Log:
    PR debug/48253
    * dwarf2out.c (struct dw_fde_struct): Remove dw_fde_hot_section_label,
    dw_fde_hot_section_end_label, dw_fde_unlikely_section_label,
    dw_fde_unlikely_section_end_label, cold_in_std_section,
    dw_fde_switched_sections and dw_fde_switched_cold_to_hot fields.
    Add dw_fde_second_begin, dw_fde_second_end and second_in_std_section
    fields.
    (output_fde): Use dw_fde_second_{begin,end} if second is
    true, otherwise dw_fde_{begin,end}.
    (output_call_frame_info): Test dw_fde_second_begin != NULL
    instead of dw_fde_switched_sections.
    (dwarf2out_begin_prologue): Stop initializing removed dw_fde_struct
    fields, initialize new fields.  Initialize in_std_section
    unconditionally from the first partition.
    (dwarf2out_end_epilogue): Don't override dw_fde_end when
    dw_fde_second_begin is non-NULL.
    (dwarf2out_switch_text_section): Stop initializing removed
    dw_fde_struct fields, initialize new fields, initialize
    also dw_fde_end here.  Set dw_fde_switch_cfi even when
    dwarf2out_do_cfi_asm ().  Call var_location_switch_text_section.
    (struct var_loc_list_def): Add last_before_switch field.
    (arange_table, arange_table_allocated, arange_table_in_use,
    ARANGE_TABLE_INCREMENT, add_arange): Removed.
    (size_of_aranges): Count !in_std_section and !second_in_std_section
    hunks in fdes, instead of looking at arange_table_in_use.
    (output_aranges): Add aranges_length argument, don't call
    size_of_aranges here.  Instead of using aranges_table*
    emit ranges for fdes when !in_std_section resp.
    !second_in_std_section.
    (dw_loc_list): Break ranges crossing section switch.
    (convert_cfa_to_fb_loc_list): Likewise.  If switched sections,
    use dw_fde_second_end instead of dw_fde_end as end of last
    range.
    (gen_subprogram_die): Don't call add_arange.  Use
    dw_fde_{begin,end} for first partition and if switched
    section dw_fde_second_{begin,end} for the second.
    (var_location_switch_text_section_1,
    var_location_switch_text_section): New functions.
    (dwarf2out_begin_function): Initialize cold_text_section even
    when function_section () isn't text_section.
    (prune_unused_types): Don't walk arange_table.
    (dwarf2out_finish): Don't needlessly test
    flag_reorder_blocks_and_partition when testing cold_text_section_used.
    If info_section_emitted, call size_of_aranges and if it indicates
    non-empty .debug_aranges, call output_aranges with the computed
    size.  Stop using removed dw_fde_struct fields, use
    dw_fde_{begin,end} for first partition and dw_fde_second_{begin,end}
    for second.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/dwarf2out.c


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug debug/48253] [4.6 Regression] Further .debug_aranges issues
  2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-03-29 22:56 ` jakub at gcc dot gnu.org
@ 2011-03-30  0:07 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-30  0:07 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-29 22:49:26 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-03-29 22:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-23 13:08 [Bug debug/48253] New: [4.6/4.7 Regression] Further .debug_aranges issues jakub at gcc dot gnu.org
2011-03-23 13:11 ` [Bug debug/48253] " jakub at gcc dot gnu.org
2011-03-23 14:49 ` jakub at gcc dot gnu.org
2011-03-24 16:34 ` rguenth at gcc dot gnu.org
2011-03-29  2:31 ` jakub at gcc dot gnu.org
2011-03-29 20:30 ` [Bug debug/48253] [4.6 " jakub at gcc dot gnu.org
2011-03-29 22:56 ` jakub at gcc dot gnu.org
2011-03-30  0:07 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).