Re: [PATCH] Better .debug_aranges fix (PR debug/48253, take 3)

2011-03-28 Thread Jason Merrill
On 03/28/2011 10:34 AM, Jakub Jelinek wrote: So perhaps if (fde->dw_fde_second_begin&& fde->dw_fde_switch_cfi == NULL) { /* If the first partition contained no CFI adjustments, the CIE opcodes apply to the whole first partition. */ *list_tail = new_loc_list (build

Re: [PATCH] Better .debug_aranges fix (PR debug/48253, take 3)

2011-03-28 Thread Jakub Jelinek
On Mon, Mar 28, 2011 at 10:23:08AM -0400, Jason Merrill wrote: > On 03/25/2011 01:01 PM, Jakub Jelinek wrote: > >+if (node == loc_list->last_before_switch > >+&& (node != loc_list->first || loc_list->first->next) > >+&& current_function_decl) > > Let's store this te

Re: [PATCH] Better .debug_aranges fix (PR debug/48253, take 3)

2011-03-28 Thread Jason Merrill
On 03/25/2011 01:01 PM, Jakub Jelinek wrote: + if (node == loc_list->last_before_switch + && (node != loc_list->first || loc_list->first->next) + && current_function_decl) Let's store this test in a local variable rather than repeat it a few lines down.

[PATCH] Better .debug_aranges fix (PR debug/48253, take 3)

2011-03-25 Thread Jakub Jelinek
On Fri, Mar 25, 2011 at 05:17:07PM +0100, Jakub Jelinek wrote: > On Thu, Mar 24, 2011 at 06:08:01PM +0100, Jason Merrill wrote: > > This ought to cut down on the number of cases we have to handle in > > all the different places in dwarf2out that deal with this stuff. > > > > Does that make sense t

[PATCH] Better .debug_aranges fix (PR debug/48253, take 2)

2011-03-25 Thread Jakub Jelinek
On Thu, Mar 24, 2011 at 06:08:01PM +0100, Jason Merrill wrote: > This ought to cut down on the number of cases we have to handle in > all the different places in dwarf2out that deal with this stuff. > > Does that make sense to you? Here is updated patch, it is quite larger than the last one, beca

Re: [PATCH] Better .debug_aranges fix (PR debug/48253)

2011-03-24 Thread Jakub Jelinek
On Thu, Mar 24, 2011 at 06:08:01PM +0100, Jason Merrill wrote: > This ought to cut down on the number of cases we have to handle in > all the different places in dwarf2out that deal with this stuff. > > Does that make sense to you? I'll try to implement it tomorrow, currently don't see why your i

Re: [PATCH] Better .debug_aranges fix (PR debug/48253)

2011-03-24 Thread Jason Merrill
On 03/23/2011 09:08 PM, Jakub Jelinek wrote: const char *dw_fde_begin; const char *dw_fde_end; const char *dw_fde_hot_section_label; const char *dw_fde_hot_section_end_label; const char *dw_fde_unlikely_section_label; const char *dw_fde_unlikely_section_end_label; dw_cfi_ref dw_fde_

[PATCH] Better .debug_aranges fix (PR debug/48253)

2011-03-23 Thread Jakub Jelinek
Hi! As the testcases in the PR show (I think they are hardly suitable for gcc testsuite though, better for gdb or elfutils testsuite), we still don't cover all code in the CU with .debug_aranges (regression from 4.5) and with -freorder-blocks-and-partition we do even more bad things. The problem