This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
breakpoints/924: Line number entry skipped
- From: miwako dot tokugawa at intel dot com
- To: gdb-gnats at sources dot redhat dot com
- Cc: svetlanax_gvozdeva at vniief dot ims dot intel dot com
- Date: 11 Jan 2003 05:01:06 -0000
- Subject: breakpoints/924: Line number entry skipped
- Reply-to: miwako dot tokugawa at intel dot com
>Number: 924
>Category: breakpoints
>Synopsis: Line number entry skipped
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 10 21:08:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: miwako.tokugawa@intel.com
>Release: unknown-1.0
>Organization:
>Environment:
32-bit Linux
>Description:
I'm attaching two sets of files.
1. test04
The problem can be seen only when files are compiled with Intel compiler. For reference, the compilation command used with Intel compiler was:
icc test04a.c test04b.c -g -O0 -o test04.exe
test04.debug_line shows the .debug_line section.
2. exec
2. Second regression test (files are attached).
Command line is 'icc -g execs.c'.
Dump of section .debug_line is attached (execs.wl).
GDB's output (GDB misses line 66, there were some entries for line 65 and different columns in debug lineinformation earlier):
(gdb) b 62
Breakpoint 1 at 0x8048b97: file execs.c, line 62.
(gdb) r
Starting program: /home1/sana/trackers/tr29662/test2/gdbC/opt_none_debug/execs.exe
This is a function call statement
Breakpoint 1, main () at execs.c:62
62 (x>y) ? ++x: ++y; /* Conditional expression */
(gdb) n
63 pattern &= mask; /* Compound AND statement */
(gdb) n
65 for (counter = 0 ; counter < 8 ; counter++) {
(gdb) n
78 case 0: printf("0\n");
(gdb) q
IDB's output:
(idb) stop 62
[#1: stop at "execs.c":62 ]
(idb) r
This is a function call statement
[1] stopped at [int main(void):62 0x8048b97]
62 (x>y) ? ++x: ++y; /* Conditional expression */
(idb) n
stopped at [int main(void):63 0x8048ba9]
63 pattern &= mask; /* Compound AND statement */
(idb) n
stopped at [int main(void):65 0x8048bb7]
65 for (counter = 0 ; counter < 8 ; counter++) {
(idb) n
stopped at [int main(void):66 0x8048bdc]
66 switch (counter) /* Switch statement */
(idb) n
stopped at [int main(void):78 0x8048c3c]
78 case 0: printf("0\n");
(idb)
LDB's output:
(ldb) b 62
Breakpoint 1 at 0x8048b97: file execs.c, line 62.
(ldb) r
This is a function call statement
Starting program: execs.exe
Breakpoint 1, main () at execs.c:62
62 (x>y) ? ++x: ++y; /* Conditional expression */
(ldb) n
63 pattern &= mask; /* Compound AND statement */
(ldb) n
65 for (counter = 0 ; counter < 8 ; counter++) {
(ldb) n
66 switch (counter) /* Switch statement */
(ldb) n
78 case 0: printf("0\n");
(ldb)
Probably GDB has problem with determination of address of next lines.
>How-To-Repeat:
1. test04
gdb ./test04.exe
(gdb) b foo
Breakpoint 1 at 0x8048aff: file test04b.c, line 6.
(gdb) r
Starting program: /home/cmplr/usr2/mtokugaw/30529/test04.exe
Breakpoint 1, foo () at test04b.c:6
6 a->a1=3;
gdb should break at line 5, not 6.
2.
gdb ./execs.exe
(gdb) b 62
Breakpoint 1 at 0x8048b77: file execs.c, line 62.
(gdb) r
Starting program: /home/cmplr/mtokugaw/30529/execs.exe
This is a function call statement
Breakpoint 1, main () at execs.c:62
62 (x>y) ? ++x: ++y; /* Conditional expression */
(gdb) n
63 pattern &= mask; /* Compound AND statement */
(gdb) n
65 for (counter = 0 ; counter < 8 ; counter++) {
(gdb) n
[ERROR here: gdb should stop at line 66]
78 case 0: printf("0\n");
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: