gdb/1222: fails to find correct source file for a generated C file with #line directives

fsblk@uaf.edu fsblk@uaf.edu
Wed May 21 20:58:00 GMT 2003


>Number:         1222
>Category:       gdb
>Synopsis:       fails to find correct source file for a generated C file with #line directives
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 21 20:58:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     fsblk@uaf.edu
>Release:        5.3
>Organization:
>Environment:
red hat linux 8
>Description:
I have a source file called main.prec which I process like this:

%.c: %.prec
	m4 --prefix-builtins --synclines $< >$@

The debugger is can't find the .prec source unless I first go and set a breakpoint in the generated .c file:

Current directory is /home/bkerin/asf/ice_motion_viewer_gtk/
GNU gdb 5.3
...
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu".

No source file named lagrangian-ice-motion-product.gob.

(gdb) b lagrangian-ice-motion-product.c:1
Breakpoint 1 at 0x8051e10: file lagrangian-ice-motion-product.c, line 1.
(gdb) D 1
(gdb) b lagrangian-ice-motion-product.gob:139
Breakpoint 2 at 0x80521f1: file lagrangian-ice-motion-product.gob, line
139.
(gdb)

I am using m4 version 1.4.1 and it seems to add the #line directives correctly (the first line of main.c is '#line 1 "main.prec"'), it just seems that gdb doesn't see them until the c file is read.

Britton Kerin  
>How-To-Repeat:

>Fix:

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



More information about the Gdb-prs mailing list