diff mbox

TPF: disable discriminators

Message ID 201207312221.q6VMLlVb019866@greed.delorie.com
State New
Headers show

Commit Message

DJ Delorie July 31, 2012, 10:21 p.m. UTC
> TARGET_TPF is always defined.  Just use a C if.
> Otherwise ok.

Thanks, checked in as attached.

What about older branches?  4.7 needs this patch, 4.6 needs my
original patch.

2012-07-31  DJ Delorie  <dj@redhat.com>

	* config/s390/s390.c (s390_option_override): Disable DWARF 3/4
	extensions for TPF, unless specifically selected.

Comments

Richard Henderson July 31, 2012, 10:25 p.m. UTC | #1
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~
DJ Delorie July 31, 2012, 10:51 p.m. UTC | #2
> 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.
Richard Henderson July 31, 2012, 11:16 p.m. UTC | #3
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~
DJ Delorie July 31, 2012, 11:29 p.m. UTC | #4
Ah, ok.
diff mbox

Patch

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,