c/4608: --save-temps breaks location information in dwarf1 output

ms@siroyan.com ms@siroyan.com
Thu Oct 18 09:16:00 GMT 2001


>Number:         4608
>Category:       c
>Synopsis:       --save-temps breaks location information in dwarf1 output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 18 09:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.0.1
>Organization:
>Environment:
System: SunOS stl01 5.7 Generic_106541-04 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

	
host: sparc-sun-solaris2.7
build: sparc-sun-solaris2.7
target: sparc-sun-solaris2.7
configured with: ../gcc/configure --prefix=/home/ms/native : (reconfigured) ../gcc/configure --prefix=/home/ms/native
>Description:
--save-temps causes the .c file to be processed by an external cpp and the 
resulting .i file to be passed into cc1. There are a number of comments in toplevel.c
and elsewhere which indicate that the correct orignal filename id (.c) should be
extracted from the initial #line directive and placed into "main_filename". This variable
is passed into the dwarf emitter in order to emit the name of the original file.
In practice "main_filename" remains set at the default .i filename causeing the dwarf
emitter to emit the .i name instead of the .c.

>How-To-Repeat:

Compile any source .c with the options:

gcc --save-temps -gdwarf -g1 t.c

Inspecting the dwarf in the resulting t.s file will indicate the .i source instead
of the .c

	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list