DW_AT_producer: Ignore -fpreprocessed
diff mbox

Message ID 20150116234221.GA9569@host2.jankratochvil.net
State New
Headers show

Commit Message

Jan Kratochvil Jan. 16, 2015, 11:42 p.m. UTC
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.


Jan
gcc/ChangeLog
	* dwarf2out.c (gen_producer_string): Ignore also OPT_fpreprocessed.

Comments

Jakub Jelinek Jan. 17, 2015, 6:41 a.m. UTC | #1
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
Jan Kratochvil Jan. 17, 2015, 8:06 a.m. UTC | #2
On Sat, 17 Jan 2015 07:41:51 +0100, Jakub Jelinek wrote:
> > gcc/ChangeLog
> > 	* dwarf2out.c (gen_producer_string): Ignore also OPT_fpreprocessed.
> 
> Ok for trunk, thanks.

Checked in: 219797


Jan

Patch
diff mbox

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: