Message ID | 201207312221.q6VMLlVb019866@greed.delorie.com |
---|---|
State | New |
Headers | show |
On 2012-07-31 15:21, DJ Delorie wrote: > What about older branches? 4.7 needs this patch, 4.6 needs my > original patch. I don't see that 4.6 requires a different patch. Otherwise ok to backport. r~
> I don't see that 4.6 requires a different patch.
4.6 is missing this:
2011-04-01 Richard Henderson <rth@redhat.com>
PR 48400
* dwarf2out.c (dwarf2out_source_line): Disable discriminators
in strict mode before dwarf4. Re-order tests to early out
before switching sections.
So either *that* patch needs to be back-ported, or the tpf-specific
workaround does.
On 2012-07-31 15:51, DJ Delorie wrote: >> I don't see that 4.6 requires a different patch. > > 4.6 is missing this: > > 2011-04-01 Richard Henderson <rth@redhat.com> > > PR 48400 > * dwarf2out.c (dwarf2out_source_line): Disable discriminators > in strict mode before dwarf4. Re-order tests to early out > before switching sections. > > So either *that* patch needs to be back-ported, or the tpf-specific > workaround does. > In 4.6 we do not emit discriminators except with DWARF2_ASM_LINE_DEBUG_INFO, and in that section we have if (SUPPORTS_DISCRIMINATOR && discriminator != 0 && (dwarf_version >= 4 || !dwarf_strict)) fprintf (asm_out_file, " discriminator %d", discriminator); and sure enough dwarf_strict is honored. That patch is only required if you have the other patches that introduce discriminators to the non-dwarf2_asm_line path. r~
Ah, ok.
Index: gcc/config/s390/s390.c =================================================================== --- gcc/config/s390/s390.c (revision 190022) +++ gcc/config/s390/s390.c (working copy) @@ -1651,12 +1651,22 @@ s390_option_override (void) flag_prefetch_loop_arrays = 1; /* Use the alternative scheduling-pressure algorithm by default. */ maybe_set_param_value (PARAM_SCHED_PRESSURE_ALGORITHM, 2, global_options.x_param_values, global_options_set.x_param_values); + + if (TARGET_TPF) + { + /* Don't emit DWARF3/4 unless specifically selected. The TPF + debuggers do not yet support DWARF 3/4. */ + if (!global_options_set.x_dwarf_strict) + dwarf_strict = 1; + if (!global_options_set.x_dwarf_version) + dwarf_version = 2; + } } /* Map for smallest class containing reg regno. */ const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] = { GENERAL_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS,