Re: [debug-early] fix problem with template parameter packs

2015-06-05 Thread Aldy Hernandez
On 06/04/2015 07:31 PM, Aldy Hernandez wrote: On 06/04/2015 02:39 PM, Jason Merrill wrote: On 06/04/2015 02:23 PM, Jason Merrill wrote: On 06/03/2015 10:42 AM, Aldy Hernandez wrote: + /* Die was generated early via dwarf2out_early_global_decl. */ + BOOL_BITFIELD dumped_early : 1; Missed

Re: [debug-early] fix problem with template parameter packs

2015-06-05 Thread Jason Merrill
On 06/04/2015 07:31 PM, Aldy Hernandez wrote: So... if I revert the !declaration change and move the big block below said change, would you be OK with it, or did you still want some changes to it? I'm still hoping to simplify it. Actually, I think we can just remove the if (old_die

Re: [debug-early] fix problem with template parameter packs

2015-06-05 Thread Jason Merrill
Looks good. Jason

Re: [debug-early] fix problem with template parameter packs

2015-06-05 Thread Aldy Hernandez
On 06/05/2015 12:20 PM, Jason Merrill wrote: Looks good. Jason Attached is the latest against mainline, with the aforementioned change, and without the dumped_early bit. Retested for --enable-languages=all,go,ada, for both GCC and GDB. Let me know how this looks. Aldy gcc/ *

Re: [debug-early] fix problem with template parameter packs

2015-06-05 Thread Jason Merrill
On 06/05/2015 12:33 PM, Aldy Hernandez wrote: + /* The tree for which this DIE was created for. We use this to Too many fors. - fprintf (outfile, DIE %4ld: %s (%p)\n, + fprintf (outfile, DIE %4ld: %s (%p), die-die_offset, dwarf_tag_name (die-die_tag), (void*) die);

Re: [debug-early] fix problem with template parameter packs

2015-06-05 Thread Aldy Hernandez
On 06/05/2015 10:02 AM, Jason Merrill wrote: On 06/04/2015 07:31 PM, Aldy Hernandez wrote: So... if I revert the !declaration change and move the big block below said change, would you be OK with it, or did you still want some changes to it? I'm still hoping to simplify it. Actually, I think

Re: [debug-early] fix problem with template parameter packs

2015-06-04 Thread Aldy Hernandez
On 06/04/2015 05:34 PM, Jason Merrill wrote: On 06/03/2015 10:42 AM, Aldy Hernandez wrote: - if (decl (DECL_ABSTRACT_P (decl) || declaration || old_die == NULL)) + if (decl (DECL_ABSTRACT_P (decl) + || !old_die || is_declaration_die (old_die))) Do we still need DECL_ABSTRACT_P?

Re: [debug-early] fix problem with template parameter packs

2015-06-04 Thread Aldy Hernandez
On 06/04/2015 02:39 PM, Jason Merrill wrote: On 06/04/2015 02:23 PM, Jason Merrill wrote: On 06/03/2015 10:42 AM, Aldy Hernandez wrote: + /* Die was generated early via dwarf2out_early_global_decl. */ + BOOL_BITFIELD dumped_early : 1; Missed a dump. Actually, why do we need this flag?

Re: [debug-early] fix problem with template parameter packs

2015-06-04 Thread Jason Merrill
On 06/03/2015 10:42 AM, Aldy Hernandez wrote: - if (decl (DECL_ABSTRACT_P (decl) || declaration || old_die == NULL)) + if (decl (DECL_ABSTRACT_P (decl) + || !old_die || is_declaration_die (old_die))) Do we still need DECL_ABSTRACT_P? I wouldn't expect to get here when

Re: [debug-early] fix problem with template parameter packs

2015-06-04 Thread Jason Merrill
On 06/03/2015 10:42 AM, Aldy Hernandez wrote: + /* Die was generated early via dwarf2out_early_global_decl. */ + BOOL_BITFIELD dumped_early : 1; Missed a dump. Actually, why do we need this flag? The uses I see are * to avoid declaring prototype parameters multiple times Can't we just

Re: [debug-early] fix problem with template parameter packs

2015-06-04 Thread Jason Merrill
On 06/04/2015 02:23 PM, Jason Merrill wrote: On 06/03/2015 10:42 AM, Aldy Hernandez wrote: + /* Die was generated early via dwarf2out_early_global_decl. */ + BOOL_BITFIELD dumped_early : 1; Missed a dump. Actually, why do we need this flag? The uses I see are * to avoid declaring

Re: [debug-early] fix problem with template parameter packs

2015-06-03 Thread Aldy Hernandez
On 06/03/2015 09:06 AM, Richard Biener wrote: On Wed, Jun 3, 2015 at 3:04 PM, Aldy Hernandez al...@redhat.com wrote: On 05/27/2015 03:34 PM, Jason Merrill wrote: It occurs to me that the early-dwarf work should make debug_abstract_function and most of the DECL_ABSTRACT handling obsolete.

Re: [debug-early] fix problem with template parameter packs

2015-06-03 Thread Aldy Hernandez
On 05/27/2015 03:34 PM, Jason Merrill wrote: It occurs to me that the early-dwarf work should make debug_abstract_function and most of the DECL_ABSTRACT handling obsolete. All we need to do is set DW_AT_inline during early debug and update it during late debug if the function is inlined.

Re: [debug-early] fix problem with template parameter packs

2015-06-03 Thread Richard Biener
On Wed, Jun 3, 2015 at 3:04 PM, Aldy Hernandez al...@redhat.com wrote: On 05/27/2015 03:34 PM, Jason Merrill wrote: It occurs to me that the early-dwarf work should make debug_abstract_function and most of the DECL_ABSTRACT handling obsolete. All we need to do is set DW_AT_inline during

Re: [debug-early] fix problem with template parameter packs

2015-05-28 Thread Richard Biener
On Wed, May 27, 2015 at 9:34 PM, Jason Merrill ja...@redhat.com wrote: OK, I see the issue. We're calling debug_abstract_function to build debug info for the abstract instance of a function that we already built from dwarf2out_early_global_decl. It occurs to me that the early-dwarf work

Re: [debug-early] fix problem with template parameter packs

2015-05-27 Thread Jason Merrill
OK, I see the issue. We're calling debug_abstract_function to build debug info for the abstract instance of a function that we already built from dwarf2out_early_global_decl. It occurs to me that the early-dwarf work should make debug_abstract_function and most of the DECL_ABSTRACT handling

Re: [debug-early] fix problem with template parameter packs

2015-05-26 Thread Aldy Hernandez
On 05/06/2015 12:28 PM, Jason Merrill wrote: On 05/05/2015 04:33 PM, Aldy Hernandez wrote: On 05/05/2015 02:08 PM, Jason Merrill wrote: On 05/04/2015 09:29 PM, Aldy Hernandez wrote: The code handling parameter DIEs needed a little tweaking for variable length template arguments. I've relaxed

Re: [debug-early] fix problem with template parameter packs

2015-05-06 Thread Jason Merrill
On 05/05/2015 04:33 PM, Aldy Hernandez wrote: On 05/05/2015 02:08 PM, Jason Merrill wrote: On 05/04/2015 09:29 PM, Aldy Hernandez wrote: The code handling parameter DIEs needed a little tweaking for variable length template arguments. I've relaxed the original assert, but this may require

Re: [debug-early] fix problem with template parameter packs

2015-05-05 Thread Jason Merrill
On 05/04/2015 09:29 PM, Aldy Hernandez wrote: The code handling parameter DIEs needed a little tweaking for variable length template arguments. I've relaxed the original assert, but this may require tweaking at branch review time-- hopefully later this week. What testcase motivated this?

Re: [debug-early] fix problem with template parameter packs

2015-05-05 Thread Aldy Hernandez
On 05/05/2015 02:08 PM, Jason Merrill wrote: On 05/04/2015 09:29 PM, Aldy Hernandez wrote: The code handling parameter DIEs needed a little tweaking for variable length template arguments. I've relaxed the original assert, but this may require tweaking at branch review time-- hopefully later

[debug-early] fix problem with template parameter packs

2015-05-04 Thread Aldy Hernandez
The code handling parameter DIEs needed a little tweaking for variable length template arguments. I've relaxed the original assert, but this may require tweaking at branch review time-- hopefully later this week. Committing to branch. Aldy p.s. Richi/Jason: Winter is coming. Down to 1 GCC