[patch] DW_AT_producer: Ignore -fpreprocessed

Jakub Jelinek jakub@redhat.com
Sat Jan 17 07:39:00 GMT 2015


On Sat, Jan 17, 2015 at 12:42:21AM +0100, Jan Kratochvil wrote:
> Hi,
> 
> I have provided a sufficient fix in GDB for the -fplugin=libcc1plugin feature:
> 	[patch+7.9] compile: Filter out -fpreprocessed
> 	https://sourceware.org/ml/gdb-patches/2015-01/msg00485.html
> 
> But still I think "-fpreprocessed" is inappropriate for DW_AT_producer.
> 
> Otherwise for an inferior built using ccache the string "-fpreprocessed" is
> put into DW_AT_producer and then GDB compilation with -fplugin=libcc1plugin
> breaks as the GDB-runtime-generated source is not already preprocessed.
> 
> I have rebuilt GCC but I have not run the testsuite with this patch.

Ok for trunk, thanks.

> gcc/ChangeLog
> 	* dwarf2out.c (gen_producer_string): Ignore also OPT_fpreprocessed.
> 
> Index: ./gcc/dwarf2out.c
> ===================================================================
> --- ./gcc/dwarf2out.c	(revision 219770)
> +++ ./gcc/dwarf2out.c	(working copy)
> @@ -19624,6 +19624,7 @@ gen_producer_string (void)
>        case OPT__sysroot_:
>        case OPT_nostdinc:
>        case OPT_nostdinc__:
> +      case OPT_fpreprocessed:
>  	/* Ignore these.  */
>  	continue;
>        default:


	Jakub



More information about the Gcc-patches mailing list