* TPF: disable discriminators
@ 2012-07-31 4:12 DJ Delorie
2012-07-31 16:55 ` Richard Henderson
0 siblings, 1 reply; 8+ messages in thread
From: DJ Delorie @ 2012-07-31 4:12 UTC (permalink / raw)
To: gcc-patches
The TPF assembler supports dwarf4 discriminators, but the TPF
debuggers do not. Ok to apply?
* config/s390/tpf.h (SUPPORTS_DISCRIMINATOR): Define to 0 for TPF.
Index: gcc/config/s390/tpf.h
===================================================================
--- gcc/config/s390/tpf.h (revision 189993)
+++ gcc/config/s390/tpf.h (working copy)
@@ -116,3 +116,6 @@
#define MATH_LIBRARY "CLBM"
#define LIBSTDCXX "CPP2"
#endif /* ! _TPF_H */
+
+/* GAS supports it, but the debuggers don't, so avoid it. */
+#define SUPPORTS_DISCRIMINATOR 0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TPF: disable discriminators
2012-07-31 4:12 TPF: disable discriminators DJ Delorie
@ 2012-07-31 16:55 ` Richard Henderson
2012-07-31 21:25 ` DJ Delorie
0 siblings, 1 reply; 8+ messages in thread
From: Richard Henderson @ 2012-07-31 16:55 UTC (permalink / raw)
To: DJ Delorie; +Cc: gcc-patches
On 2012-07-30 21:07, DJ Delorie wrote:
> +
> +/* GAS supports it, but the debuggers don't, so avoid it. */
> +#define SUPPORTS_DISCRIMINATOR 0
Then you shouldn't be fiddling this, but rather dwarf_strict.
See e.g. darwin and vxworks ports.
r~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TPF: disable discriminators
2012-07-31 16:55 ` Richard Henderson
@ 2012-07-31 21:25 ` DJ Delorie
2012-07-31 22:22 ` Richard Henderson
0 siblings, 1 reply; 8+ messages in thread
From: DJ Delorie @ 2012-07-31 21:25 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches
Ah, the original complaint was for a gcc branch which doesn't have
your strict-dwarf/discriminator patch.
How's this?
Index: gcc/config/s390/s390.c
===================================================================
--- gcc/config/s390/s390.c (revision 190017)
+++ gcc/config/s390/s390.c (working copy)
@@ -1651,12 +1651,21 @@ 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);
+
+#ifdef 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;
+#endif
}
/* Map for smallest class containing reg regno. */
const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
{ GENERAL_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS,
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TPF: disable discriminators
2012-07-31 21:25 ` DJ Delorie
@ 2012-07-31 22:22 ` Richard Henderson
2012-07-31 22:26 ` DJ Delorie
0 siblings, 1 reply; 8+ messages in thread
From: Richard Henderson @ 2012-07-31 22:22 UTC (permalink / raw)
To: DJ Delorie; +Cc: gcc-patches
On 2012-07-31 14:09, DJ Delorie wrote:
> +#ifdef 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;
> +#endif
TARGET_TPF is always defined. Just use a C if.
Otherwise ok.
r~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TPF: disable discriminators
2012-07-31 22:22 ` Richard Henderson
@ 2012-07-31 22:26 ` DJ Delorie
2012-07-31 22:47 ` Richard Henderson
0 siblings, 1 reply; 8+ messages in thread
From: DJ Delorie @ 2012-07-31 22:26 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches
> 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.
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,
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TPF: disable discriminators
2012-07-31 22:26 ` DJ Delorie
@ 2012-07-31 22:47 ` Richard Henderson
2012-07-31 23:22 ` DJ Delorie
0 siblings, 1 reply; 8+ messages in thread
From: Richard Henderson @ 2012-07-31 22:47 UTC (permalink / raw)
To: DJ Delorie; +Cc: gcc-patches
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~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TPF: disable discriminators
2012-07-31 23:22 ` DJ Delorie
@ 2012-07-31 23:21 ` Richard Henderson
0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2012-07-31 23:21 UTC (permalink / raw)
To: DJ Delorie; +Cc: gcc-patches
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~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: TPF: disable discriminators
2012-07-31 22:47 ` Richard Henderson
@ 2012-07-31 23:22 ` DJ Delorie
2012-07-31 23:21 ` Richard Henderson
0 siblings, 1 reply; 8+ messages in thread
From: DJ Delorie @ 2012-07-31 23:22 UTC (permalink / raw)
To: Richard Henderson; +Cc: gcc-patches
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-07-31 23:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-31 4:12 TPF: disable discriminators DJ Delorie
2012-07-31 16:55 ` Richard Henderson
2012-07-31 21:25 ` DJ Delorie
2012-07-31 22:22 ` Richard Henderson
2012-07-31 22:26 ` DJ Delorie
2012-07-31 22:47 ` Richard Henderson
2012-07-31 23:22 ` DJ Delorie
2012-07-31 23:21 ` Richard Henderson
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).