This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

symtab/2360: problem setting breakpoints by file:lineno in files with #line directives


>Number:         2360
>Category:       symtab
>Synopsis:       problem setting breakpoints by file:lineno in files with #line directives
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 15 23:38:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     dje@google.com
>Release:        gdb-6.7.1
>Organization:
>Environment:
i686-linux [any dwarf-based arch will do I think]
>Description:
Starting with gdb 6.5, setting breakpoints by file:lineno on the included testcases bug[123].c stopped working.  The suspect patch is:

2006-04-21  Frederic Riss  <frederic.riss@st.com>

        * dwarf2read.c (dwarf2_start_subfile): Change prototype to accept
        compilation directory as last argument.
        Always pass comp_dir as second argument to start_subfile and prepend
        dirname to the filename when necessary.
        Remove now superfluous search for pre-existing subfile.
        (dwarf_decode_lines): Pass the compilation directory to
        dwarf2_start_subfile.

This was partially fixed in 6.7 with this patch:

2007-05-14  Maxim Grigoriev  <maxim2405@gmail.com>

        * buildsym.c (start_subfile): Handle absolute pathnames
        while comparing subfile names.

but setting breakpoints in bug[23].c still doesn't work.
>How-To-Repeat:
dje@ruffy:/tmp$ cat bug1.c
#line 2 "/tmp/bug1.c"
int main () {return 0;}
dje@ruffy:/tmp$ gcc -g bug1.c -o bug1.x
dje@ruffy:/tmp$ cat bug2.c
#line 2 "//tmp/bug2.c"
int main () {return 0;}
dje@ruffy:/tmp$ gcc -g bug2.c -o bug2.x
dje@ruffy:/tmp$ cat bug3.c
#line 2 "./bug3.c"
int main () {return 0;}
dje@ruffy:/tmp$ gcc -g bug3.c -o bug3.x
dje@ruffy:/tmp$ gdb bug1.x
(gdb) b bug1.c:2
No line 2 in file "bug1.c".
(gdb) q
dje@ruffy:/tmp$ gdb bug2.x
(gdb) b bug2.c:2
No line 2 in file "bug2.c".
(gdb) q
dje@ruffy:/tmp$ gdb bug3.x
(gdb) b bug3.c:2
No line 2 in file "bug3.c".
(gdb) q
>Fix:

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]