* [RFC] Gdb line table implementation tweak
@ 2002-02-12 16:28 Fred Fish
2002-02-13 7:10 ` Daniel Jacobowitz
2002-02-21 12:50 ` Jim Blandy
0 siblings, 2 replies; 17+ messages in thread
From: Fred Fish @ 2002-02-12 16:28 UTC (permalink / raw)
To: gdb-patches; +Cc: fnf
The implementation of gdb's line number table can cause gdb to give
misleading results when some parts of a program are compiled with
debugging enabled and other parts are not. Here is an example:
$ cat Makefile
CXX = g++
all: p p.stabs p1.o.stabs
p: p1.o p2.o
$(CXX) -o p p1.o p2.o
p1.o: p1.s
$(CXX) -c p1.s
p2.o: p2.s
$(CXX) -c p2.s
p1.s: p1.cpp
$(CXX) -g -S p1.cpp
p2.s: p2.cpp
$(CXX) -S p2.cpp
p.stabs: p
objdump --stabs p >p.stabs
p1.o.stabs: p1.o
objdump --stabs p1.o >p1.o.stabs
clean:
rm -f p1.o p2.o p1.s p2.s p Makefile~ *.syms *.stabs
$ cat p1.cpp
#include <stdio.h>
class MainClass
{
public:
MainClass() {};
~MainClass() {};
virtual void main();
};
void MainClass::main()
{
}
int main(int argc, char** argv)
{
extern void subr (int);
subr (5);
}
$ cat p2.cpp
#include <stdio.h>
void subr (int x)
{
printf ("x = %d\n", x);
}
$
If we run make to build executable 'p', where p1.o is compiled with
debugging enabled and p2.o is compiled without debugging, gdb gets
confused about what file subr() is in. It thinks it is in p1.cpp,
when it is really in p2.cpp:
$make
g++ -g -S p1.cpp
g++ -c p1.s
g++ -S p2.cpp
g++ -c p2.s
g++ -o p p1.o p2.o
objdump --stabs p >p.stabs
objdump --stabs p1.o >p1.o.stabs
$ /usr/sourceware/bin/gdb p
GNU gdb 2002-02-12-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) br *0x8048634
Breakpoint 1 at 0x8048634: file p1.cpp, line 19.
(gdb) x/i 0x8048634
0x8048634 <subr__Fi>: push %ebp
(gdb) run
Starting program: /cygnus/cases/106539/example5-linux/p
Breakpoint 1, 0x08048634 in subr () at p1.cpp:19
19 }
(gdb) bt
#0 0x08048634 in subr () at p1.cpp:19
#1 0x400b2306 in __libc_start_main (main=0x8048618 <main>, argc=1, ubp_av=0xbfffeef4, init=0x8048474 <_init>, fini=0x80486f8 <_fini>, rtld_fini=0x4000d2dc <_dl_fini>,
stack_end=0xbfffeeec) at ../sysdeps/generic/libc-start.c:129
(gdb) quit
The program is running. Exit anyway? (y or n) y
$
Note in the above, setting the breakpoint at the first instruction of
subr() appears to put it at line 19 in p1.cpp. When the program is
run and gdb stops at subr(), which is actually in p2.cpp, it prints it
wrong again. And in the backtrace, gdb gets the right function, but
the wrong file and line number.
One way to fix this is to slightly change the line table such that it
allows gdb to know what ranges of PC's represent ranges for which line
number info is valid and which don't. An easy way to do that is to
use an entry with a line number of zero to mark ranges that have no
valid line number info.
For example, the line table for p1.cpp is:
Line table:
line 12 at 0x8048610
line 13 at 0x8048616
line 16 at 0x8048618
line 18 at 0x804861e
line 19 at 0x804862b
line 9 at 0x8048690
line 19 at 0x8048696
line 6 at 0x80486bc
line 7 at 0x80486cc
After applying the attached patch, gdb's internal representation of
the line table for p1.cpp changes to the following:
Line table:
line 12 at 0x8048610
line 13 at 0x8048616
line 0 at 0x8048618
line 16 at 0x8048618
line 18 at 0x804861e
line 19 at 0x804862b
line 0 at 0x8048632
line 9 at 0x8048690
line 19 at 0x8048696
line 0 at 0x80486bb
line 6 at 0x80486bc
line 0 at 0x80486ca
line 7 at 0x80486cc
line 0 at 0x80486f5
And rerunning gdb on the test case produces:
$ /tmp/gdb p
GNU gdb 2002-02-12-cvs
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) br *0x8048634
Breakpoint 1 at 0x8048634
(gdb) x/i 0x8048634
0x8048634 <subr__Fi>: push %ebp
(gdb) run
Starting program: /cygnus/cases/106539/example5-linux/p
Breakpoint 1, 0x08048634 in subr ()
(gdb) bt
#0 0x08048634 in subr ()
#1 0x400b2306 in __libc_start_main (main=0x8048618 <main>, argc=1, ubp_av=0xbfffe674, init=0x8048474 <_init>, fini=0x80486f8 <_fini>, rtld_fini=0x4000d2dc <_dl_fini>,
stack_end=0xbfffe66c) at ../sysdeps/generic/libc-start.c:129
(gdb) quit
The program is running. Exit anyway? (y or n) y
$
It might be a little easier to understand how the line table describes
the entire range of PC's from it's lowest to highest if we match up
the new line table entries with a disassembly produced by gdb. Note
in the following that now gdb knows which parts actually come from
p1.cpp (a range starting with a nonzero line number) and which parts
have no valid line info (a range starting with a zero line number):
line 12 at 0x8048610 0x8048610 <main__9MainClass>: push %ebp
0x8048611 <main__9MainClass+1>: mov %esp,%ebp
0x8048613 <main__9MainClass+3>: mov 0x8(%ebp),%eax
line 13 at 0x8048616 0x8048616 <main__9MainClass+6>: pop %ebp
0x8048617 <main__9MainClass+7>: ret
line 0 at 0x8048618
line 16 at 0x8048618 0x8048618 <main>: push %ebp
0x8048619 <main+1>: mov %esp,%ebp
0x804861b <main+3>: sub $0x8,%esp
line 18 at 0x804861e 0x804861e <main+6>: sub $0xc,%esp
0x8048621 <main+9>: push $0x5
0x8048623 <main+11>: call 0x8048634 <subr__Fi>
0x8048628 <main+16>: add $0x10,%esp
line 19 at 0x804862b 0x804862b <main+19>: mov $0x0,%eax
0x8048630 <main+24>: leave
0x8048631 <main+25>: ret
line 0 at 0x8048632 0x8048632 <main+26>: mov %esi,%esi
0x8048634 <subr__Fi>: push %ebp
0x8048635 <subr__Fi+1>: mov %esp,%ebp
0x8048637 <subr__Fi+3>: sub $0x8,%esp
0x804863a <subr__Fi+6>: sub $0x8,%esp
0x804863d <subr__Fi+9>: pushl 0x8(%ebp)
0x8048640 <subr__Fi+12>: push $0x804872b
0x8048645 <subr__Fi+17>: call 0x80484cc <printf>
0x804864a <subr__Fi+22>: add $0x10,%esp
0x804864d <subr__Fi+25>: leave
0x804864e <subr__Fi+26>: ret
0x804864f <subr__Fi+27>: nop
0x8048650 <__do_global_ctors_aux>: push %ebp
0x8048651 <__do_global_ctors_aux+1>: mov %esp,%ebp
0x8048653 <__do_global_ctors_aux+3>: push %ebx
0x8048654 <__do_global_ctors_aux+4>: sub $0x4,%esp
0x8048657 <__do_global_ctors_aux+7>: mov 0x804978c,%eax
0x804865c <__do_global_ctors_aux+12>: mov $0x804978c,%ebx
0x8048661 <__do_global_ctors_aux+17>: cmp $0xffffffff,%eax
0x8048664 <__do_global_ctors_aux+20>: je 0x804867c <__do_global_ctors_aux+44>
0x8048666 <__do_global_ctors_aux+22>: lea 0x0(%esi),%esi
0x8048669 <__do_global_ctors_aux+25>: lea 0x0(%edi,1),%edi
0x8048670 <__do_global_ctors_aux+32>: sub $0x4,%ebx
0x8048673 <__do_global_ctors_aux+35>: call *%eax
0x8048675 <__do_global_ctors_aux+37>: mov (%ebx),%eax
0x8048677 <__do_global_ctors_aux+39>: cmp $0xffffffff,%eax
0x804867a <__do_global_ctors_aux+42>: jne 0x8048670 <__do_global_ctors_aux+32>
0x804867c <__do_global_ctors_aux+44>: pop %eax
0x804867d <__do_global_ctors_aux+45>: pop %ebx
0x804867e <__do_global_ctors_aux+46>: pop %ebp
0x804867f <__do_global_ctors_aux+47>: ret
0x8048680 <init_dummy>: push %ebp
0x8048681 <init_dummy+1>: mov %esp,%ebp
0x8048683 <init_dummy+3>: sub $0x8,%esp
0x8048686 <init_dummy+6>: mov %ebp,%esp
0x8048688 <init_dummy+8>: pop %ebp
0x8048689 <init_dummy+9>: ret
0x804868a <init_dummy+10>: lea 0x0(%esi),%esi
line 9 at 0x8048690 0x8048690 <__tf9MainClass>: push %ebp
0x8048691 <__tf9MainClass+1>: mov %esp,%ebp
0x8048693 <__tf9MainClass+3>: sub $0x8,%esp
line 19 at 0x8048696 0x8048696 <__tf9MainClass+6>: cmpl $0x0,0x80498b8
0x804869d <__tf9MainClass+13>: jne 0x80486b4 <__tf9MainClass+36>
0x804869f <__tf9MainClass+15>: sub $0x8,%esp
0x80486a2 <__tf9MainClass+18>: push $0x8048720
0x80486a7 <__tf9MainClass+23>: push $0x80498b8
0x80486ac <__tf9MainClass+28>: call 0x804849c <__rtti_user>
0x80486b1 <__tf9MainClass+33>: add $0x10,%esp
0x80486b4 <__tf9MainClass+36>: mov $0x80498b8,%eax
0x80486b9 <__tf9MainClass+41>: leave
0x80486ba <__tf9MainClass+42>: ret
line 0 at 0x80486bb 0x80486bb <__tf9MainClass+43>: nop
line 6 at 0x80486bc 0x80486bc <__9MainClass>: push %ebp
0x80486bd <__9MainClass+1>: mov %esp,%ebp
0x80486bf <__9MainClass+3>: mov 0x8(%ebp),%eax
0x80486c2 <__9MainClass+6>: movl $0x8049748,(%eax)
0x80486c8 <__9MainClass+12>: pop %ebp
0x80486c9 <__9MainClass+13>: ret
line 0 at 0x80486ca 0x80486ca <__9MainClass+14>: mov %esi,%esi
line 7 at 0x80486cc 0x80486cc <_._9MainClass>: push %ebp
0x80486cd <_._9MainClass+1>: mov %esp,%ebp
0x80486cf <_._9MainClass+3>: sub $0x8,%esp
0x80486d2 <_._9MainClass+6>: mov 0xc(%ebp),%eax
0x80486d5 <_._9MainClass+9>: mov 0x8(%ebp),%edx
0x80486d8 <_._9MainClass+12>: movl $0x8049748,(%edx)
0x80486de <_._9MainClass+18>: and $0x1,%eax
0x80486e1 <_._9MainClass+21>: test %al,%al
0x80486e3 <_._9MainClass+23>: je 0x80486f3 <_._9MainClass+39>
0x80486e5 <_._9MainClass+25>: sub $0xc,%esp
0x80486e8 <_._9MainClass+28>: pushl 0x8(%ebp)
0x80486eb <_._9MainClass+31>: call 0x80484ec <__builtin_delete>
0x80486f0 <_._9MainClass+36>: add $0x10,%esp
0x80486f3 <_._9MainClass+39>: leave
0x80486f4 <_._9MainClass+40>: ret
line 0 at 0x80486f5 0x80486f5 <_._9MainClass+41>: lea 0x0(%esi),%esi
The patch to make this work for stabs is very simple and supplied
below for discussion purposes. I presume it would be fairly easy to
also change the other debug info readers to do the same thing.
Obviously someday we would like to have gdb take full advantage of
more expressive formats like DWARF, but for now this patch seems to
have substantial advantages.
I did run before and after testing with the gdb testsuite and it
didn't show any regressions, or improvements for that matter, but that
is to be expected since we don't actually test for functionality with
mixed levels of debugging information.
-Fred
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2184
diff -c -p -r1.2184 ChangeLog
*** ChangeLog 2002/02/12 00:59:27 1.2184
--- ChangeLog 2002/02/13 00:22:47
***************
*** 1,3 ****
--- 1,14 ----
+ 2002-02-11 Fred Fish <fnf@redhat.com>
+
+ * dbxread.c (process_one_symbol): When finding an N_FUN symbol
+ that marks the end of the range of a function, enter a line number
+ entry that has a line number of zero and a PC offset that matches
+ the end of the function. This starts a range of PC's for which no
+ line number information is known.
+ * symtab.c (find_pc_sect_line): If our best fit is in a range of
+ PC's for which no line number info is found (line number is zero)
+ then we didn't find any valid line information.
+
2002-02-11 Richard Earnshaw <rearnsha@arm.com>
* arm-linux-nat.c: Really include arm-tdep.h.
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.29
diff -c -p -r1.29 dbxread.c
*** dbxread.c 2002/02/04 11:55:34 1.29
--- dbxread.c 2002/02/13 00:22:50
*************** process_one_symbol (int type, int desc,
*** 2741,2746 ****
--- 2741,2747 ----
{
/* This N_FUN marks the end of a function. This closes off the
current block. */
+ record_line (current_subfile, 0, function_start_offset + valu);
within_function = 0;
new = pop_context ();
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.54
diff -c -p -r1.54 symtab.c
*** symtab.c 2002/02/11 03:21:53 1.54
--- symtab.c 2002/02/13 00:22:54
*************** find_pc_sect_line (CORE_ADDR pc, struct
*** 1823,1828 ****
--- 1823,1835 ----
val.end = alt->pc;
}
}
+ else if (best->line == 0)
+ {
+ /* If our best fit is in a range of PC's for which no line
+ number info is available (line number is zero) then we didn't
+ find any valid line information. */
+ val.pc = pc;
+ }
else
{
val.symtab = best_symtab;
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [RFC] Gdb line table implementation tweak
2002-02-12 16:28 [RFC] Gdb line table implementation tweak Fred Fish
@ 2002-02-13 7:10 ` Daniel Jacobowitz
2002-02-21 12:50 ` Jim Blandy
1 sibling, 0 replies; 17+ messages in thread
From: Daniel Jacobowitz @ 2002-02-13 7:10 UTC (permalink / raw)
To: fnf; +Cc: gdb-patches
On Tue, Feb 12, 2002 at 05:28:55PM -0700, Fred Fish wrote:
> The implementation of gdb's line number table can cause gdb to give
> misleading results when some parts of a program are compiled with
> debugging enabled and other parts are not. Here is an example:
I like this patch; I like it a lot. It fixes a problem I've described
on the lists several times now involving libstdc++. I'm not sure it
will fix all my problems, given that texthigh/textlow for the psymtabs
are still used in various places and will be incorrect; but it should
be purely an improvement.
This should fix the problem we were attempting to solve in:
2001-11-13 Jim Blandy <jimb@redhat.com>
...
Patch from Peter Schauer:
* symtab.c (find_pc_sect_line): If we can't find the function
containing PC, we certainly won't have line number information for
that location, so return zero immediately.
Which had to be reverted for breaking assembly language debugging.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [RFC] Gdb line table implementation tweak
2002-02-12 16:28 [RFC] Gdb line table implementation tweak Fred Fish
2002-02-13 7:10 ` Daniel Jacobowitz
@ 2002-02-21 12:50 ` Jim Blandy
2002-02-23 13:37 ` Mark Kettenis
1 sibling, 1 reply; 17+ messages in thread
From: Jim Blandy @ 2002-02-21 12:50 UTC (permalink / raw)
To: fnf; +Cc: gdb-patches
Holey moley! This patch is approved, sir.
Fred Fish <fnf@public.ninemoons.com> writes:
> The implementation of gdb's line number table can cause gdb to give
> misleading results when some parts of a program are compiled with
> debugging enabled and other parts are not. Here is an example:
>
> $ cat Makefile
> CXX = g++
>
> all: p p.stabs p1.o.stabs
>
> p: p1.o p2.o
> $(CXX) -o p p1.o p2.o
>
> p1.o: p1.s
> $(CXX) -c p1.s
>
> p2.o: p2.s
> $(CXX) -c p2.s
>
> p1.s: p1.cpp
> $(CXX) -g -S p1.cpp
>
> p2.s: p2.cpp
> $(CXX) -S p2.cpp
>
> p.stabs: p
> objdump --stabs p >p.stabs
>
> p1.o.stabs: p1.o
> objdump --stabs p1.o >p1.o.stabs
>
> clean:
> rm -f p1.o p2.o p1.s p2.s p Makefile~ *.syms *.stabs
>
>
> $ cat p1.cpp
> #include <stdio.h>
>
> class MainClass
> {
> public:
> MainClass() {};
> ~MainClass() {};
> virtual void main();
> };
>
> void MainClass::main()
> {
> }
>
> int main(int argc, char** argv)
> {
> extern void subr (int);
> subr (5);
> }
>
> $ cat p2.cpp
> #include <stdio.h>
>
> void subr (int x)
> {
> printf ("x = %d\n", x);
> }
> $
>
> If we run make to build executable 'p', where p1.o is compiled with
> debugging enabled and p2.o is compiled without debugging, gdb gets
> confused about what file subr() is in. It thinks it is in p1.cpp,
> when it is really in p2.cpp:
>
> $make
> g++ -g -S p1.cpp
> g++ -c p1.s
> g++ -S p2.cpp
> g++ -c p2.s
> g++ -o p p1.o p2.o
> objdump --stabs p >p.stabs
> objdump --stabs p1.o >p1.o.stabs
> $ /usr/sourceware/bin/gdb p
> GNU gdb 2002-02-12-cvs
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu"...
> (gdb) br *0x8048634
> Breakpoint 1 at 0x8048634: file p1.cpp, line 19.
> (gdb) x/i 0x8048634
> 0x8048634 <subr__Fi>: push %ebp
> (gdb) run
> Starting program: /cygnus/cases/106539/example5-linux/p
>
> Breakpoint 1, 0x08048634 in subr () at p1.cpp:19
> 19 }
> (gdb) bt
> #0 0x08048634 in subr () at p1.cpp:19
> #1 0x400b2306 in __libc_start_main (main=0x8048618 <main>, argc=1, ubp_av=0xbfffeef4, init=0x8048474 <_init>, fini=0x80486f8 <_fini>, rtld_fini=0x4000d2dc <_dl_fini>,
> stack_end=0xbfffeeec) at ../sysdeps/generic/libc-start.c:129
> (gdb) quit
> The program is running. Exit anyway? (y or n) y
> $
>
> Note in the above, setting the breakpoint at the first instruction of
> subr() appears to put it at line 19 in p1.cpp. When the program is
> run and gdb stops at subr(), which is actually in p2.cpp, it prints it
> wrong again. And in the backtrace, gdb gets the right function, but
> the wrong file and line number.
>
> One way to fix this is to slightly change the line table such that it
> allows gdb to know what ranges of PC's represent ranges for which line
> number info is valid and which don't. An easy way to do that is to
> use an entry with a line number of zero to mark ranges that have no
> valid line number info.
>
> For example, the line table for p1.cpp is:
>
> Line table:
>
> line 12 at 0x8048610
> line 13 at 0x8048616
> line 16 at 0x8048618
> line 18 at 0x804861e
> line 19 at 0x804862b
> line 9 at 0x8048690
> line 19 at 0x8048696
> line 6 at 0x80486bc
> line 7 at 0x80486cc
>
> After applying the attached patch, gdb's internal representation of
> the line table for p1.cpp changes to the following:
>
> Line table:
>
> line 12 at 0x8048610
> line 13 at 0x8048616
> line 0 at 0x8048618
> line 16 at 0x8048618
> line 18 at 0x804861e
> line 19 at 0x804862b
> line 0 at 0x8048632
> line 9 at 0x8048690
> line 19 at 0x8048696
> line 0 at 0x80486bb
> line 6 at 0x80486bc
> line 0 at 0x80486ca
> line 7 at 0x80486cc
> line 0 at 0x80486f5
>
> And rerunning gdb on the test case produces:
>
> $ /tmp/gdb p
> GNU gdb 2002-02-12-cvs
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu"...
> (gdb) br *0x8048634
> Breakpoint 1 at 0x8048634
> (gdb) x/i 0x8048634
> 0x8048634 <subr__Fi>: push %ebp
> (gdb) run
> Starting program: /cygnus/cases/106539/example5-linux/p
>
> Breakpoint 1, 0x08048634 in subr ()
> (gdb) bt
> #0 0x08048634 in subr ()
> #1 0x400b2306 in __libc_start_main (main=0x8048618 <main>, argc=1, ubp_av=0xbfffe674, init=0x8048474 <_init>, fini=0x80486f8 <_fini>, rtld_fini=0x4000d2dc <_dl_fini>,
> stack_end=0xbfffe66c) at ../sysdeps/generic/libc-start.c:129
> (gdb) quit
> The program is running. Exit anyway? (y or n) y
> $
>
> It might be a little easier to understand how the line table describes
> the entire range of PC's from it's lowest to highest if we match up
> the new line table entries with a disassembly produced by gdb. Note
> in the following that now gdb knows which parts actually come from
> p1.cpp (a range starting with a nonzero line number) and which parts
> have no valid line info (a range starting with a zero line number):
>
>
> line 12 at 0x8048610 0x8048610 <main__9MainClass>: push %ebp
> 0x8048611 <main__9MainClass+1>: mov %esp,%ebp
> 0x8048613 <main__9MainClass+3>: mov 0x8(%ebp),%eax
> line 13 at 0x8048616 0x8048616 <main__9MainClass+6>: pop %ebp
> 0x8048617 <main__9MainClass+7>: ret
> line 0 at 0x8048618
> line 16 at 0x8048618 0x8048618 <main>: push %ebp
> 0x8048619 <main+1>: mov %esp,%ebp
> 0x804861b <main+3>: sub $0x8,%esp
>
> line 18 at 0x804861e 0x804861e <main+6>: sub $0xc,%esp
> 0x8048621 <main+9>: push $0x5
> 0x8048623 <main+11>: call 0x8048634 <subr__Fi>
> 0x8048628 <main+16>: add $0x10,%esp
>
> line 19 at 0x804862b 0x804862b <main+19>: mov $0x0,%eax
> 0x8048630 <main+24>: leave
> 0x8048631 <main+25>: ret
>
> line 0 at 0x8048632 0x8048632 <main+26>: mov %esi,%esi
> 0x8048634 <subr__Fi>: push %ebp
> 0x8048635 <subr__Fi+1>: mov %esp,%ebp
> 0x8048637 <subr__Fi+3>: sub $0x8,%esp
> 0x804863a <subr__Fi+6>: sub $0x8,%esp
> 0x804863d <subr__Fi+9>: pushl 0x8(%ebp)
> 0x8048640 <subr__Fi+12>: push $0x804872b
> 0x8048645 <subr__Fi+17>: call 0x80484cc <printf>
> 0x804864a <subr__Fi+22>: add $0x10,%esp
> 0x804864d <subr__Fi+25>: leave
> 0x804864e <subr__Fi+26>: ret
> 0x804864f <subr__Fi+27>: nop
> 0x8048650 <__do_global_ctors_aux>: push %ebp
> 0x8048651 <__do_global_ctors_aux+1>: mov %esp,%ebp
> 0x8048653 <__do_global_ctors_aux+3>: push %ebx
> 0x8048654 <__do_global_ctors_aux+4>: sub $0x4,%esp
> 0x8048657 <__do_global_ctors_aux+7>: mov 0x804978c,%eax
> 0x804865c <__do_global_ctors_aux+12>: mov $0x804978c,%ebx
> 0x8048661 <__do_global_ctors_aux+17>: cmp $0xffffffff,%eax
> 0x8048664 <__do_global_ctors_aux+20>: je 0x804867c <__do_global_ctors_aux+44>
> 0x8048666 <__do_global_ctors_aux+22>: lea 0x0(%esi),%esi
> 0x8048669 <__do_global_ctors_aux+25>: lea 0x0(%edi,1),%edi
> 0x8048670 <__do_global_ctors_aux+32>: sub $0x4,%ebx
> 0x8048673 <__do_global_ctors_aux+35>: call *%eax
> 0x8048675 <__do_global_ctors_aux+37>: mov (%ebx),%eax
> 0x8048677 <__do_global_ctors_aux+39>: cmp $0xffffffff,%eax
> 0x804867a <__do_global_ctors_aux+42>: jne 0x8048670 <__do_global_ctors_aux+32>
> 0x804867c <__do_global_ctors_aux+44>: pop %eax
> 0x804867d <__do_global_ctors_aux+45>: pop %ebx
> 0x804867e <__do_global_ctors_aux+46>: pop %ebp
> 0x804867f <__do_global_ctors_aux+47>: ret
> 0x8048680 <init_dummy>: push %ebp
> 0x8048681 <init_dummy+1>: mov %esp,%ebp
> 0x8048683 <init_dummy+3>: sub $0x8,%esp
> 0x8048686 <init_dummy+6>: mov %ebp,%esp
> 0x8048688 <init_dummy+8>: pop %ebp
> 0x8048689 <init_dummy+9>: ret
> 0x804868a <init_dummy+10>: lea 0x0(%esi),%esi
>
> line 9 at 0x8048690 0x8048690 <__tf9MainClass>: push %ebp
> 0x8048691 <__tf9MainClass+1>: mov %esp,%ebp
> 0x8048693 <__tf9MainClass+3>: sub $0x8,%esp
>
> line 19 at 0x8048696 0x8048696 <__tf9MainClass+6>: cmpl $0x0,0x80498b8
> 0x804869d <__tf9MainClass+13>: jne 0x80486b4 <__tf9MainClass+36>
> 0x804869f <__tf9MainClass+15>: sub $0x8,%esp
> 0x80486a2 <__tf9MainClass+18>: push $0x8048720
> 0x80486a7 <__tf9MainClass+23>: push $0x80498b8
> 0x80486ac <__tf9MainClass+28>: call 0x804849c <__rtti_user>
> 0x80486b1 <__tf9MainClass+33>: add $0x10,%esp
> 0x80486b4 <__tf9MainClass+36>: mov $0x80498b8,%eax
> 0x80486b9 <__tf9MainClass+41>: leave
> 0x80486ba <__tf9MainClass+42>: ret
>
> line 0 at 0x80486bb 0x80486bb <__tf9MainClass+43>: nop
>
> line 6 at 0x80486bc 0x80486bc <__9MainClass>: push %ebp
> 0x80486bd <__9MainClass+1>: mov %esp,%ebp
> 0x80486bf <__9MainClass+3>: mov 0x8(%ebp),%eax
> 0x80486c2 <__9MainClass+6>: movl $0x8049748,(%eax)
> 0x80486c8 <__9MainClass+12>: pop %ebp
> 0x80486c9 <__9MainClass+13>: ret
>
> line 0 at 0x80486ca 0x80486ca <__9MainClass+14>: mov %esi,%esi
>
> line 7 at 0x80486cc 0x80486cc <_._9MainClass>: push %ebp
> 0x80486cd <_._9MainClass+1>: mov %esp,%ebp
> 0x80486cf <_._9MainClass+3>: sub $0x8,%esp
> 0x80486d2 <_._9MainClass+6>: mov 0xc(%ebp),%eax
> 0x80486d5 <_._9MainClass+9>: mov 0x8(%ebp),%edx
> 0x80486d8 <_._9MainClass+12>: movl $0x8049748,(%edx)
> 0x80486de <_._9MainClass+18>: and $0x1,%eax
> 0x80486e1 <_._9MainClass+21>: test %al,%al
> 0x80486e3 <_._9MainClass+23>: je 0x80486f3 <_._9MainClass+39>
> 0x80486e5 <_._9MainClass+25>: sub $0xc,%esp
> 0x80486e8 <_._9MainClass+28>: pushl 0x8(%ebp)
> 0x80486eb <_._9MainClass+31>: call 0x80484ec <__builtin_delete>
> 0x80486f0 <_._9MainClass+36>: add $0x10,%esp
> 0x80486f3 <_._9MainClass+39>: leave
> 0x80486f4 <_._9MainClass+40>: ret
>
> line 0 at 0x80486f5 0x80486f5 <_._9MainClass+41>: lea 0x0(%esi),%esi
>
> The patch to make this work for stabs is very simple and supplied
> below for discussion purposes. I presume it would be fairly easy to
> also change the other debug info readers to do the same thing.
> Obviously someday we would like to have gdb take full advantage of
> more expressive formats like DWARF, but for now this patch seems to
> have substantial advantages.
>
> I did run before and after testing with the gdb testsuite and it
> didn't show any regressions, or improvements for that matter, but that
> is to be expected since we don't actually test for functionality with
> mixed levels of debugging information.
>
> -Fred
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/src/src/gdb/ChangeLog,v
> retrieving revision 1.2184
> diff -c -p -r1.2184 ChangeLog
> *** ChangeLog 2002/02/12 00:59:27 1.2184
> --- ChangeLog 2002/02/13 00:22:47
> ***************
> *** 1,3 ****
> --- 1,14 ----
> + 2002-02-11 Fred Fish <fnf@redhat.com>
> +
> + * dbxread.c (process_one_symbol): When finding an N_FUN symbol
> + that marks the end of the range of a function, enter a line number
> + entry that has a line number of zero and a PC offset that matches
> + the end of the function. This starts a range of PC's for which no
> + line number information is known.
> + * symtab.c (find_pc_sect_line): If our best fit is in a range of
> + PC's for which no line number info is found (line number is zero)
> + then we didn't find any valid line information.
> +
> 2002-02-11 Richard Earnshaw <rearnsha@arm.com>
>
> * arm-linux-nat.c: Really include arm-tdep.h.
> Index: dbxread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dbxread.c,v
> retrieving revision 1.29
> diff -c -p -r1.29 dbxread.c
> *** dbxread.c 2002/02/04 11:55:34 1.29
> --- dbxread.c 2002/02/13 00:22:50
> *************** process_one_symbol (int type, int desc,
> *** 2741,2746 ****
> --- 2741,2747 ----
> {
> /* This N_FUN marks the end of a function. This closes off the
> current block. */
> + record_line (current_subfile, 0, function_start_offset + valu);
> within_function = 0;
> new = pop_context ();
>
> Index: symtab.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/symtab.c,v
> retrieving revision 1.54
> diff -c -p -r1.54 symtab.c
> *** symtab.c 2002/02/11 03:21:53 1.54
> --- symtab.c 2002/02/13 00:22:54
> *************** find_pc_sect_line (CORE_ADDR pc, struct
> *** 1823,1828 ****
> --- 1823,1835 ----
> val.end = alt->pc;
> }
> }
> + else if (best->line == 0)
> + {
> + /* If our best fit is in a range of PC's for which no line
> + number info is available (line number is zero) then we didn't
> + find any valid line information. */
> + val.pc = pc;
> + }
> else
> {
> val.symtab = best_symtab;
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [RFC] Gdb line table implementation tweak
2002-02-21 12:50 ` Jim Blandy
@ 2002-02-23 13:37 ` Mark Kettenis
2002-02-27 13:43 ` Jim Blandy
0 siblings, 1 reply; 17+ messages in thread
From: Mark Kettenis @ 2002-02-23 13:37 UTC (permalink / raw)
To: Jim Blandy; +Cc: fnf, gdb-patches
Unfortunately, this patch turns quite a few PASSes into FAILS on
i386-unknown-freebsd4.4. Here's a diff of the test summary before and
after applying the patch. Are we sure this patch is an improvement?
--- gdb.sum.orig Sat Feb 23 22:21:50 2002
+++ gdb.sum Sat Feb 23 22:35:10 2002
@@ -1,4 +1,4 @@
-Test Run By kettenis on Sat Feb 23 22:14:32 2002
+Test Run By kettenis on Sat Feb 23 22:27:38 2002
Native configuration is i386-unknown-freebsd4.4
=== gdb tests ===
@@ -358,21 +358,21 @@
PASS: gdb.base/call-ar-st.exp: continuing to breakpoint 1220, pattern 8
PASS: gdb.base/call-ar-st.exp: continuing to breakpoint 1220, pattern 9
PASS: gdb.base/call-ar-st.exp: continuing to breakpoint 1220, pattern 10 + sentinel
-PASS: gdb.base/call-ar-st.exp: step inside print_all_arrays
-PASS: gdb.base/call-ar-st.exp: next over print_int_array in print-all_arrays
-PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 1
-PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 2
-PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 3
-PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 4
-PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 5 + sentinel
+FAIL: gdb.base/call-ar-st.exp: step inside print_all_arrays
+FAIL: gdb.base/call-ar-st.exp: next over print_int_array in print-all_arrays
+FAIL: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 1
+UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 2
+UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 3
+UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 4
+UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 5 + sentinel
PASS: gdb.base/call-ar-st.exp: tbreakpoint line 1236
-PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 1
-PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 2
-PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 3
-PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 4
-PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 5
-PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 6
-PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 7 + sentinel
+FAIL: gdb.base/call-ar-st.exp: continuing to 1236, pattern 1
+UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 2
+UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 3
+UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 4
+UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 5
+UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 6
+UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 7 + sentinel
PASS: gdb.base/call-ar-st.exp: print sum_array_print(10, *list1, *list2, *list3, *list4)
PASS: gdb.base/call-ar-st.exp: next to 1237
PASS: gdb.base/call-ar-st.exp: print print_array_rep(*list1, *list2, *list3)
@@ -461,7 +461,7 @@
PASS: gdb.base/call-ar-st.exp: tbreakpoint line 1300
PASS: gdb.base/call-ar-st.exp: continue to 1300
FAIL: gdb.base/call-ar-st.exp: step into init_bit_flags_combo
-PASS: gdb.base/call-ar-st.exp: print print_bit_flags_combo from init_bit_flags_combo
+FAIL: gdb.base/call-ar-st.exp: print print_bit_flags_combo from init_bit_flags_combo
PASS: gdb.base/call-ar-st.exp: tbreakpoint line 1305
PASS: gdb.base/call-ar-st.exp: continue to 1305
PASS: gdb.base/call-ar-st.exp: print print_long_arg_list, pattern 1
@@ -1385,18 +1385,18 @@
PASS: gdb.base/display.exp: disab 3
PASS: gdb.base/display.exp: watch off
PASS: gdb.base/display.exp: finish
-PASS: gdb.base/display.exp: step
+FAIL: gdb.base/display.exp: step
PASS: gdb.base/display.exp: tbreak 37
-PASS: gdb.base/display.exp: cont
+FAIL: gdb.base/display.exp: cont: the program exited
PASS: gdb.base/display.exp: printf
PASS: gdb.base/display.exp: printf %d
PASS: gdb.base/display.exp: printf "%d
-PASS: gdb.base/display.exp: printf "%d%d",i
+FAIL: gdb.base/display.exp: printf "%d%d",i
PASS: gdb.base/display.exp: printf "\\!\a\f\r\t\v\b\n"
PASS: gdb.base/display.exp: re-set term
PASS: gdb.base/display.exp: printf "\w"
PASS: gdb.base/display.exp: printf "%d" j
-PASS: gdb.base/display.exp: print/r j
+FAIL: gdb.base/display.exp: print/r j
PASS: gdb.base/display.exp: debug test output
PASS: gdb.base/display.exp: x/0 j
PASS: gdb.base/display.exp: print/0 j
@@ -1404,7 +1404,7 @@
PASS: gdb.base/display.exp: no i
PASS: gdb.base/display.exp: print/a &sum
PASS: gdb.base/display.exp: print/a main+4
-PASS: gdb.base/display.exp: print/a $pc
+FAIL: gdb.base/display.exp: print/a $pc
PASS: gdb.base/display.exp: print/a &&j
Running ../../../../src/src/gdb/testsuite/gdb.base/echo.exp ...
PASS: gdb.base/echo.exp: Echo test
@@ -2107,9 +2107,9 @@
PASS: gdb.base/funcargs.exp: finish from indirectly called function
FAIL: gdb.base/funcargs.exp: stepping into indirectly called function
PASS: gdb.base/funcargs.exp: finish from marker_call_with_trampolines
-PASS: gdb.base/funcargs.exp: stepping into function called with trampolines
-PASS: gdb.base/funcargs.exp: backtrace through call with trampolines
-PASS: gdb.base/funcargs.exp: stepping back to main from function called with trampolines
+FAIL: gdb.base/funcargs.exp: stepping into function called with trampolines
+FAIL: gdb.base/funcargs.exp: backtrace through call with trampolines
+FAIL: gdb.base/funcargs.exp: stepping back to main from function called with trampolines
Running ../../../../src/src/gdb/testsuite/gdb.base/gcore.exp ...
PASS: gdb.base/gcore.exp: help gcore
PASS: gdb.base/gcore.exp: set breakpoint at terminal_func
@@ -2507,14 +2507,15 @@
FAIL: gdb.base/list.exp: list list0.c:main
FAIL: gdb.base/list.exp: list list0.c:unused
FAIL: gdb.base/list.exp: list list0.h:foo
-PASS: gdb.base/list.exp: list filename:function (2 tests)
+FAIL: gdb.base/list.exp: list list1.c:unused
+PASS: gdb.base/list.exp: list filename:function (1 tests)
XFAIL: gdb.base/list.exp: list filename:function; wrong filename rejected
PASS: gdb.base/list.exp: list filename:function; nonexistant file
PASS: gdb.base/list.exp: list filename:function; nonexistant function
PASS: gdb.base/list.exp: set listsize 4
FAIL: gdb.base/list.exp: list long_line
PASS: gdb.base/list.exp: search 4321
-PASS: gdb.base/list.exp: search 6789
+FAIL: gdb.base/list.exp: search 6789
PASS: gdb.base/list.exp: search extremely long line (> 5000 chars)
Running ../../../../src/src/gdb/testsuite/gdb.base/logical.exp ...
PASS: gdb.base/logical.exp: set variable x=0
@@ -3472,7 +3473,8 @@
PASS: gdb.base/ptype.exp: ptype named enumeration
PASS: gdb.base/ptype.exp: ptype unnamed typedef'd enumeration
PASS: gdb.base/ptype.exp: list main
-PASS: gdb.base/ptype.exp: whatis unnamed typedef'd enum (compiler bug in IBM's xlc)
+ERROR: get_debug_format used when no current source file
+UNRESOLVED: gdb.base/ptype.exp: whatis unnamed typedef'd enum (compiler bug in IBM's xlc)
PASS: gdb.base/ptype.exp: printing typedef'd struct
PASS: gdb.base/ptype.exp: printing typedef'd union
PASS: gdb.base/ptype.exp: ptype named typedef'd enumf'd enum
@@ -3490,14 +3492,15 @@
PASS: gdb.base/ptype.exp: ptype nested structure #2
PASS: gdb.base/ptype.exp: ptype inner int
PASS: gdb.base/ptype.exp: ptype nested union
-XFAIL: gdb.base/ptype.exp: ptype func_type (compiler doesn't emit prototyped types)
+ERROR: get_debug_format used when no current source file
+UNRESOLVED: gdb.base/ptype.exp: ptype func_type (compiler doesn't emit prototyped types)
PASS: gdb.base/ptype.exp: ptype old_fptr
-XFAIL: gdb.base/ptype.exp: ptype new_fptr (compiler doesn't emit prototyped types)
-XFAIL: gdb.base/ptype.exp: ptype fptr (compiler doesn't emit prototyped types)
-XFAIL: gdb.base/ptype.exp: ptype fptr2 (compiler doesn't emit prototyped types)
-XFAIL: gdb.base/ptype.exp: ptype xptr (compiler doesn't emit prototyped types)
-XFAIL: gdb.base/ptype.exp: ptype ffptr (compiler doesn't emit prototyped types)
-XFAIL: gdb.base/ptype.exp: ptype fffptr (compiler doesn't emit prototyped types)
+FAIL: gdb.base/ptype.exp: ptype new_fptr (compiler doesn't emit prototyped types)
+FAIL: gdb.base/ptype.exp: ptype fptr (compiler doesn't emit prototyped types)
+FAIL: gdb.base/ptype.exp: ptype fptr2 (compiler doesn't emit prototyped types)
+FAIL: gdb.base/ptype.exp: ptype xptr (compiler doesn't emit prototyped types)
+FAIL: gdb.base/ptype.exp: ptype ffptr (compiler doesn't emit prototyped types)
+FAIL: gdb.base/ptype.exp: ptype fffptr (compiler doesn't emit prototyped types)
PASS: gdb.base/ptype.exp: ptype "abc"
PASS: gdb.base/ptype.exp: ptype {'a','b','c'}
PASS: gdb.base/ptype.exp: ptype {0,1,2}
@@ -4190,7 +4193,7 @@
PASS: gdb.base/shlib-call.exp: step inside shr2 (shlib func)
PASS: gdb.base/shlib-call.exp: step out of shr2 to main
PASS: gdb.base/shlib-call.exp: print mainshr1(1)
-PASS: gdb.base/shlib-call.exp: step into mainshr1
+FAIL: gdb.base/shlib-call.exp: step into mainshr1
PASS: gdb.base/shlib-call.exp: set bp in shared library
PASS: gdb.base/shlib-call.exp: run to bp in shared library
PASS: gdb.base/shlib-call.exp: cont
@@ -4696,17 +4699,17 @@
PASS: gdb.base/step-line.exp: next over dummy 1
PASS: gdb.base/step-line.exp: next to dummy 2
PASS: gdb.base/step-line.exp: next over dummy 2
-PASS: gdb.base/step-line.exp: step into f2
-PASS: gdb.base/step-line.exp: next over dummy 4
-PASS: gdb.base/step-line.exp: next to dummy 5
-PASS: gdb.base/step-line.exp: next to dummy 6
-PASS: gdb.base/step-line.exp: next over dummy 6
-PASS: gdb.base/step-line.exp: next to dummy 7
-PASS: gdb.base/step-line.exp: next to dummy 8
-PASS: gdb.base/step-line.exp: next over dummy 8
-PASS: gdb.base/step-line.exp: next to dummy 9
-PASS: gdb.base/step-line.exp: next to dummy 10
-PASS: gdb.base/step-line.exp: next over dummy 10
+FAIL: gdb.base/step-line.exp: step into f2
+FAIL: gdb.base/step-line.exp: next over dummy 4
+FAIL: gdb.base/step-line.exp: next to dummy 5
+FAIL: gdb.base/step-line.exp: next to dummy 6
+FAIL: gdb.base/step-line.exp: next over dummy 6
+FAIL: gdb.base/step-line.exp: next to dummy 7
+FAIL: gdb.base/step-line.exp: next to dummy 8
+FAIL: gdb.base/step-line.exp: next over dummy 8
+FAIL: gdb.base/step-line.exp: next to dummy 9
+FAIL: gdb.base/step-line.exp: next to dummy 10
+FAIL: gdb.base/step-line.exp: next over dummy 10
Running ../../../../src/src/gdb/testsuite/gdb.base/step-test.exp ...
PASS: gdb.base/step-test.exp: next 1
PASS: gdb.base/step-test.exp: step 1
@@ -4723,7 +4726,7 @@
PASS: gdb.base/step-test.exp: nexti over function
PASS: gdb.base/step-test.exp: set breakpoint at call to large_struct_by_value
PASS: gdb.base/step-test.exp: run to pass large struct
-PASS: gdb.base/step-test.exp: large struct by value
+FAIL: gdb.base/step-test.exp: large struct by value
PASS: gdb.base/step-test.exp: continue until exit at step-test.exp
Running ../../../../src/src/gdb/testsuite/gdb.base/structs.exp ...
PASS: gdb.base/structs.exp: set print sevenbit-strings
@@ -6354,9 +6357,9 @@
PASS: gdb.c++/overload.exp: print call overloaded func float arg
PASS: gdb.c++/overload.exp: print call overloaded func double arg
FAIL: gdb.c++/overload.exp: list overloaded function with no args
-PASS: gdb.c++/overload.exp: list overloaded function with int arg
-PASS: gdb.c++/overload.exp: list overloaded function with function ptr args
-PASS: gdb.c++/overload.exp: list overloaded function with function ptr args - quotes around argument
+FAIL: gdb.c++/overload.exp: list overloaded function with int arg
+FAIL: gdb.c++/overload.exp: list overloaded function with function ptr args
+FAIL: gdb.c++/overload.exp: list overloaded function with function ptr args - quotes around argument
Running ../../../../src/src/gdb/testsuite/gdb.c++/ovldbreak.exp ...
PASS: gdb.c++/ovldbreak.exp: bp menu for foo::overload1arg choice 12
PASS: gdb.c++/ovldbreak.exp: set bp 2 on foo::overload1arg 12 line 111
@@ -7108,9 +7111,9 @@
PASS: gdb.mi/mi-simplerun.exp: list of breakpoints, 16 disabled
PASS: gdb.mi/mi-simplerun.exp: run to main
PASS: gdb.mi/mi-simplerun.exp: next at main
-PASS: gdb.mi/mi-simplerun.exp: step at main
-PASS: gdb.mi/mi-simplerun.exp: step to callee4
-PASS: gdb.mi/mi-simplerun.exp: exec-finish
+FAIL: gdb.mi/mi-simplerun.exp: step at main (unknown output after running)
+FAIL: gdb.mi/mi-simplerun.exp: step to callee4 (unknown output after running)
+FAIL: gdb.mi/mi-simplerun.exp: exec-finish (unknown output after running)
PASS: gdb.mi/mi-simplerun.exp: continue to end
Running ../../../../src/src/gdb/testsuite/gdb.mi/mi-stack.exp ...
PASS: gdb.mi/mi-stack.exp: break-insert operation
@@ -7638,9 +7641,9 @@
PASS: gdb.mi/mi0-simplerun.exp: list of breakpoints, 16 disabled
PASS: gdb.mi/mi0-simplerun.exp: run to main
PASS: gdb.mi/mi0-simplerun.exp: next at main
-PASS: gdb.mi/mi0-simplerun.exp: step at main
-PASS: gdb.mi/mi0-simplerun.exp: step to callee4
-PASS: gdb.mi/mi0-simplerun.exp: exec-finish
+FAIL: gdb.mi/mi0-simplerun.exp: step at main (unknown output after running)
+FAIL: gdb.mi/mi0-simplerun.exp: step to callee4 (unknown output after running)
+FAIL: gdb.mi/mi0-simplerun.exp: exec-finish (unknown output after running)
PASS: gdb.mi/mi0-simplerun.exp: continue to end
Running ../../../../src/src/gdb/testsuite/gdb.mi/mi0-stack.exp ...
PASS: gdb.mi/mi0-stack.exp: break-insert operation
@@ -8239,11 +8242,11 @@
=== gdb Summary ===
-# of expected passes 7561
-# of unexpected failures 152
+# of expected passes 7514
+# of unexpected failures 195
# of unexpected successes 12
-# of expected failures 156
-# of unresolved testcases 100
+# of expected failures 149
+# of unresolved testcases 112
# of untested testcases 1
# of unsupported tests 3
/usr/home/kettenis/obj/gdb/gdb/testsuite/../../gdb/gdb version 2002-02-23-cvs -nx
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [RFC] Gdb line table implementation tweak
2002-02-23 13:37 ` Mark Kettenis
@ 2002-02-27 13:43 ` Jim Blandy
2002-02-27 15:24 ` Fred Fish
0 siblings, 1 reply; 17+ messages in thread
From: Jim Blandy @ 2002-02-27 13:43 UTC (permalink / raw)
To: Mark Kettenis; +Cc: fnf, gdb-patches
Mark Kettenis <kettenis@kettenis.dyndns.org> writes:
> Unfortunately, this patch turns quite a few PASSes into FAILS on
> i386-unknown-freebsd4.4. Here's a diff of the test summary before and
> after applying the patch. Are we sure this patch is an improvement?
This patch addresses a lot of long-standing problems in GDB's handling
of C++ link-once sections; I'm pretty sure it's a step forward,
overall. I think we should put a good effort into fixing up the patch
before we consider backing it out.
Fred, could you look into these failures?
>
> --- gdb.sum.orig Sat Feb 23 22:21:50 2002
> +++ gdb.sum Sat Feb 23 22:35:10 2002
> @@ -1,4 +1,4 @@
> -Test Run By kettenis on Sat Feb 23 22:14:32 2002
> +Test Run By kettenis on Sat Feb 23 22:27:38 2002
> Native configuration is i386-unknown-freebsd4.4
>
> === gdb tests ===
> @@ -358,21 +358,21 @@
> PASS: gdb.base/call-ar-st.exp: continuing to breakpoint 1220, pattern 8
> PASS: gdb.base/call-ar-st.exp: continuing to breakpoint 1220, pattern 9
> PASS: gdb.base/call-ar-st.exp: continuing to breakpoint 1220, pattern 10 + sentinel
> -PASS: gdb.base/call-ar-st.exp: step inside print_all_arrays
> -PASS: gdb.base/call-ar-st.exp: next over print_int_array in print-all_arrays
> -PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 1
> -PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 2
> -PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 3
> -PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 4
> -PASS: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 5 + sentinel
> +FAIL: gdb.base/call-ar-st.exp: step inside print_all_arrays
> +FAIL: gdb.base/call-ar-st.exp: next over print_int_array in print-all_arrays
> +FAIL: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 1
> +UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 2
> +UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 3
> +UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 4
> +UNRESOLVED: gdb.base/call-ar-st.exp: print print_double_array(array_d), pattern 5 + sentinel
> PASS: gdb.base/call-ar-st.exp: tbreakpoint line 1236
> -PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 1
> -PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 2
> -PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 3
> -PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 4
> -PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 5
> -PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 6
> -PASS: gdb.base/call-ar-st.exp: continuing to 1236, pattern 7 + sentinel
> +FAIL: gdb.base/call-ar-st.exp: continuing to 1236, pattern 1
> +UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 2
> +UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 3
> +UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 4
> +UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 5
> +UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 6
> +UNRESOLVED: gdb.base/call-ar-st.exp: continuing to 1236, pattern 7 + sentinel
> PASS: gdb.base/call-ar-st.exp: print sum_array_print(10, *list1, *list2, *list3, *list4)
> PASS: gdb.base/call-ar-st.exp: next to 1237
> PASS: gdb.base/call-ar-st.exp: print print_array_rep(*list1, *list2, *list3)
> @@ -461,7 +461,7 @@
> PASS: gdb.base/call-ar-st.exp: tbreakpoint line 1300
> PASS: gdb.base/call-ar-st.exp: continue to 1300
> FAIL: gdb.base/call-ar-st.exp: step into init_bit_flags_combo
> -PASS: gdb.base/call-ar-st.exp: print print_bit_flags_combo from init_bit_flags_combo
> +FAIL: gdb.base/call-ar-st.exp: print print_bit_flags_combo from init_bit_flags_combo
> PASS: gdb.base/call-ar-st.exp: tbreakpoint line 1305
> PASS: gdb.base/call-ar-st.exp: continue to 1305
> PASS: gdb.base/call-ar-st.exp: print print_long_arg_list, pattern 1
> @@ -1385,18 +1385,18 @@
> PASS: gdb.base/display.exp: disab 3
> PASS: gdb.base/display.exp: watch off
> PASS: gdb.base/display.exp: finish
> -PASS: gdb.base/display.exp: step
> +FAIL: gdb.base/display.exp: step
> PASS: gdb.base/display.exp: tbreak 37
> -PASS: gdb.base/display.exp: cont
> +FAIL: gdb.base/display.exp: cont: the program exited
> PASS: gdb.base/display.exp: printf
> PASS: gdb.base/display.exp: printf %d
> PASS: gdb.base/display.exp: printf "%d
> -PASS: gdb.base/display.exp: printf "%d%d",i
> +FAIL: gdb.base/display.exp: printf "%d%d",i
> PASS: gdb.base/display.exp: printf "\\!\a\f\r\t\v\b\n"
> PASS: gdb.base/display.exp: re-set term
> PASS: gdb.base/display.exp: printf "\w"
> PASS: gdb.base/display.exp: printf "%d" j
> -PASS: gdb.base/display.exp: print/r j
> +FAIL: gdb.base/display.exp: print/r j
> PASS: gdb.base/display.exp: debug test output
> PASS: gdb.base/display.exp: x/0 j
> PASS: gdb.base/display.exp: print/0 j
> @@ -1404,7 +1404,7 @@
> PASS: gdb.base/display.exp: no i
> PASS: gdb.base/display.exp: print/a &sum
> PASS: gdb.base/display.exp: print/a main+4
> -PASS: gdb.base/display.exp: print/a $pc
> +FAIL: gdb.base/display.exp: print/a $pc
> PASS: gdb.base/display.exp: print/a &&j
> Running ../../../../src/src/gdb/testsuite/gdb.base/echo.exp ...
> PASS: gdb.base/echo.exp: Echo test
> @@ -2107,9 +2107,9 @@
> PASS: gdb.base/funcargs.exp: finish from indirectly called function
> FAIL: gdb.base/funcargs.exp: stepping into indirectly called function
> PASS: gdb.base/funcargs.exp: finish from marker_call_with_trampolines
> -PASS: gdb.base/funcargs.exp: stepping into function called with trampolines
> -PASS: gdb.base/funcargs.exp: backtrace through call with trampolines
> -PASS: gdb.base/funcargs.exp: stepping back to main from function called with trampolines
> +FAIL: gdb.base/funcargs.exp: stepping into function called with trampolines
> +FAIL: gdb.base/funcargs.exp: backtrace through call with trampolines
> +FAIL: gdb.base/funcargs.exp: stepping back to main from function called with trampolines
> Running ../../../../src/src/gdb/testsuite/gdb.base/gcore.exp ...
> PASS: gdb.base/gcore.exp: help gcore
> PASS: gdb.base/gcore.exp: set breakpoint at terminal_func
> @@ -2507,14 +2507,15 @@
> FAIL: gdb.base/list.exp: list list0.c:main
> FAIL: gdb.base/list.exp: list list0.c:unused
> FAIL: gdb.base/list.exp: list list0.h:foo
> -PASS: gdb.base/list.exp: list filename:function (2 tests)
> +FAIL: gdb.base/list.exp: list list1.c:unused
> +PASS: gdb.base/list.exp: list filename:function (1 tests)
> XFAIL: gdb.base/list.exp: list filename:function; wrong filename rejected
> PASS: gdb.base/list.exp: list filename:function; nonexistant file
> PASS: gdb.base/list.exp: list filename:function; nonexistant function
> PASS: gdb.base/list.exp: set listsize 4
> FAIL: gdb.base/list.exp: list long_line
> PASS: gdb.base/list.exp: search 4321
> -PASS: gdb.base/list.exp: search 6789
> +FAIL: gdb.base/list.exp: search 6789
> PASS: gdb.base/list.exp: search extremely long line (> 5000 chars)
> Running ../../../../src/src/gdb/testsuite/gdb.base/logical.exp ...
> PASS: gdb.base/logical.exp: set variable x=0
> @@ -3472,7 +3473,8 @@
> PASS: gdb.base/ptype.exp: ptype named enumeration
> PASS: gdb.base/ptype.exp: ptype unnamed typedef'd enumeration
> PASS: gdb.base/ptype.exp: list main
> -PASS: gdb.base/ptype.exp: whatis unnamed typedef'd enum (compiler bug in IBM's xlc)
> +ERROR: get_debug_format used when no current source file
> +UNRESOLVED: gdb.base/ptype.exp: whatis unnamed typedef'd enum (compiler bug in IBM's xlc)
> PASS: gdb.base/ptype.exp: printing typedef'd struct
> PASS: gdb.base/ptype.exp: printing typedef'd union
> PASS: gdb.base/ptype.exp: ptype named typedef'd enumf'd enum
> @@ -3490,14 +3492,15 @@
> PASS: gdb.base/ptype.exp: ptype nested structure #2
> PASS: gdb.base/ptype.exp: ptype inner int
> PASS: gdb.base/ptype.exp: ptype nested union
> -XFAIL: gdb.base/ptype.exp: ptype func_type (compiler doesn't emit prototyped types)
> +ERROR: get_debug_format used when no current source file
> +UNRESOLVED: gdb.base/ptype.exp: ptype func_type (compiler doesn't emit prototyped types)
> PASS: gdb.base/ptype.exp: ptype old_fptr
> -XFAIL: gdb.base/ptype.exp: ptype new_fptr (compiler doesn't emit prototyped types)
> -XFAIL: gdb.base/ptype.exp: ptype fptr (compiler doesn't emit prototyped types)
> -XFAIL: gdb.base/ptype.exp: ptype fptr2 (compiler doesn't emit prototyped types)
> -XFAIL: gdb.base/ptype.exp: ptype xptr (compiler doesn't emit prototyped types)
> -XFAIL: gdb.base/ptype.exp: ptype ffptr (compiler doesn't emit prototyped types)
> -XFAIL: gdb.base/ptype.exp: ptype fffptr (compiler doesn't emit prototyped types)
> +FAIL: gdb.base/ptype.exp: ptype new_fptr (compiler doesn't emit prototyped types)
> +FAIL: gdb.base/ptype.exp: ptype fptr (compiler doesn't emit prototyped types)
> +FAIL: gdb.base/ptype.exp: ptype fptr2 (compiler doesn't emit prototyped types)
> +FAIL: gdb.base/ptype.exp: ptype xptr (compiler doesn't emit prototyped types)
> +FAIL: gdb.base/ptype.exp: ptype ffptr (compiler doesn't emit prototyped types)
> +FAIL: gdb.base/ptype.exp: ptype fffptr (compiler doesn't emit prototyped types)
> PASS: gdb.base/ptype.exp: ptype "abc"
> PASS: gdb.base/ptype.exp: ptype {'a','b','c'}
> PASS: gdb.base/ptype.exp: ptype {0,1,2}
> @@ -4190,7 +4193,7 @@
> PASS: gdb.base/shlib-call.exp: step inside shr2 (shlib func)
> PASS: gdb.base/shlib-call.exp: step out of shr2 to main
> PASS: gdb.base/shlib-call.exp: print mainshr1(1)
> -PASS: gdb.base/shlib-call.exp: step into mainshr1
> +FAIL: gdb.base/shlib-call.exp: step into mainshr1
> PASS: gdb.base/shlib-call.exp: set bp in shared library
> PASS: gdb.base/shlib-call.exp: run to bp in shared library
> PASS: gdb.base/shlib-call.exp: cont
> @@ -4696,17 +4699,17 @@
> PASS: gdb.base/step-line.exp: next over dummy 1
> PASS: gdb.base/step-line.exp: next to dummy 2
> PASS: gdb.base/step-line.exp: next over dummy 2
> -PASS: gdb.base/step-line.exp: step into f2
> -PASS: gdb.base/step-line.exp: next over dummy 4
> -PASS: gdb.base/step-line.exp: next to dummy 5
> -PASS: gdb.base/step-line.exp: next to dummy 6
> -PASS: gdb.base/step-line.exp: next over dummy 6
> -PASS: gdb.base/step-line.exp: next to dummy 7
> -PASS: gdb.base/step-line.exp: next to dummy 8
> -PASS: gdb.base/step-line.exp: next over dummy 8
> -PASS: gdb.base/step-line.exp: next to dummy 9
> -PASS: gdb.base/step-line.exp: next to dummy 10
> -PASS: gdb.base/step-line.exp: next over dummy 10
> +FAIL: gdb.base/step-line.exp: step into f2
> +FAIL: gdb.base/step-line.exp: next over dummy 4
> +FAIL: gdb.base/step-line.exp: next to dummy 5
> +FAIL: gdb.base/step-line.exp: next to dummy 6
> +FAIL: gdb.base/step-line.exp: next over dummy 6
> +FAIL: gdb.base/step-line.exp: next to dummy 7
> +FAIL: gdb.base/step-line.exp: next to dummy 8
> +FAIL: gdb.base/step-line.exp: next over dummy 8
> +FAIL: gdb.base/step-line.exp: next to dummy 9
> +FAIL: gdb.base/step-line.exp: next to dummy 10
> +FAIL: gdb.base/step-line.exp: next over dummy 10
> Running ../../../../src/src/gdb/testsuite/gdb.base/step-test.exp ...
> PASS: gdb.base/step-test.exp: next 1
> PASS: gdb.base/step-test.exp: step 1
> @@ -4723,7 +4726,7 @@
> PASS: gdb.base/step-test.exp: nexti over function
> PASS: gdb.base/step-test.exp: set breakpoint at call to large_struct_by_value
> PASS: gdb.base/step-test.exp: run to pass large struct
> -PASS: gdb.base/step-test.exp: large struct by value
> +FAIL: gdb.base/step-test.exp: large struct by value
> PASS: gdb.base/step-test.exp: continue until exit at step-test.exp
> Running ../../../../src/src/gdb/testsuite/gdb.base/structs.exp ...
> PASS: gdb.base/structs.exp: set print sevenbit-strings
> @@ -6354,9 +6357,9 @@
> PASS: gdb.c++/overload.exp: print call overloaded func float arg
> PASS: gdb.c++/overload.exp: print call overloaded func double arg
> FAIL: gdb.c++/overload.exp: list overloaded function with no args
> -PASS: gdb.c++/overload.exp: list overloaded function with int arg
> -PASS: gdb.c++/overload.exp: list overloaded function with function ptr args
> -PASS: gdb.c++/overload.exp: list overloaded function with function ptr args - quotes around argument
> +FAIL: gdb.c++/overload.exp: list overloaded function with int arg
> +FAIL: gdb.c++/overload.exp: list overloaded function with function ptr args
> +FAIL: gdb.c++/overload.exp: list overloaded function with function ptr args - quotes around argument
> Running ../../../../src/src/gdb/testsuite/gdb.c++/ovldbreak.exp ...
> PASS: gdb.c++/ovldbreak.exp: bp menu for foo::overload1arg choice 12
> PASS: gdb.c++/ovldbreak.exp: set bp 2 on foo::overload1arg 12 line 111
> @@ -7108,9 +7111,9 @@
> PASS: gdb.mi/mi-simplerun.exp: list of breakpoints, 16 disabled
> PASS: gdb.mi/mi-simplerun.exp: run to main
> PASS: gdb.mi/mi-simplerun.exp: next at main
> -PASS: gdb.mi/mi-simplerun.exp: step at main
> -PASS: gdb.mi/mi-simplerun.exp: step to callee4
> -PASS: gdb.mi/mi-simplerun.exp: exec-finish
> +FAIL: gdb.mi/mi-simplerun.exp: step at main (unknown output after running)
> +FAIL: gdb.mi/mi-simplerun.exp: step to callee4 (unknown output after running)
> +FAIL: gdb.mi/mi-simplerun.exp: exec-finish (unknown output after running)
> PASS: gdb.mi/mi-simplerun.exp: continue to end
> Running ../../../../src/src/gdb/testsuite/gdb.mi/mi-stack.exp ...
> PASS: gdb.mi/mi-stack.exp: break-insert operation
> @@ -7638,9 +7641,9 @@
> PASS: gdb.mi/mi0-simplerun.exp: list of breakpoints, 16 disabled
> PASS: gdb.mi/mi0-simplerun.exp: run to main
> PASS: gdb.mi/mi0-simplerun.exp: next at main
> -PASS: gdb.mi/mi0-simplerun.exp: step at main
> -PASS: gdb.mi/mi0-simplerun.exp: step to callee4
> -PASS: gdb.mi/mi0-simplerun.exp: exec-finish
> +FAIL: gdb.mi/mi0-simplerun.exp: step at main (unknown output after running)
> +FAIL: gdb.mi/mi0-simplerun.exp: step to callee4 (unknown output after running)
> +FAIL: gdb.mi/mi0-simplerun.exp: exec-finish (unknown output after running)
> PASS: gdb.mi/mi0-simplerun.exp: continue to end
> Running ../../../../src/src/gdb/testsuite/gdb.mi/mi0-stack.exp ...
> PASS: gdb.mi/mi0-stack.exp: break-insert operation
> @@ -8239,11 +8242,11 @@
>
> === gdb Summary ===
>
> -# of expected passes 7561
> -# of unexpected failures 152
> +# of expected passes 7514
> +# of unexpected failures 195
> # of unexpected successes 12
> -# of expected failures 156
> -# of unresolved testcases 100
> +# of expected failures 149
> +# of unresolved testcases 112
> # of untested testcases 1
> # of unsupported tests 3
> /usr/home/kettenis/obj/gdb/gdb/testsuite/../../gdb/gdb version 2002-02-23-cvs -nx
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [RFC] Gdb line table implementation tweak
2002-02-27 13:43 ` Jim Blandy
@ 2002-02-27 15:24 ` Fred Fish
2002-03-16 22:51 ` [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak) Daniel Jacobowitz
0 siblings, 1 reply; 17+ messages in thread
From: Fred Fish @ 2002-02-27 15:24 UTC (permalink / raw)
To: Jim Blandy; +Cc: Mark Kettenis, fnf, gdb-patches
> Fred, could you look into these failures?
Yes, but I would need access to a host system that exhibits
the failures. Given a pointer and access to such a system,
I can try and see what is going on.
-Fred
^ permalink raw reply [flat|nested] 17+ messages in thread
* [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-02-27 15:24 ` Fred Fish
@ 2002-03-16 22:51 ` Daniel Jacobowitz
2002-03-18 13:44 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Daniel Jacobowitz @ 2002-03-16 22:51 UTC (permalink / raw)
To: fnf; +Cc: Jim Blandy, Mark Kettenis, gdb-patches
[This is long. Feel free to skip to the patch at the very end, and
stop to take a gander at the testsuite numbers in the middle :)]
On Wed, Feb 27, 2002 at 04:20:05PM -0700, Fred Fish wrote:
> > Fred, could you look into these failures?
>
> Yes, but I would need access to a host system that exhibits
> the failures. Given a pointer and access to such a system,
> I can try and see what is going on.
I've got it. It's almost exactly like the bug I fixed in binutils
addr2line a few hours ago. We do not have an N_SLINE at the beginning
of the function. Our starting lines for functions have, as a result,
always been a little odd...
So how do we figure out where we are? There's two ways. GCC gives us
the line number of the start of the function in the N_FUN, but other
compilers don't. Also, every function should contain at least one
line number note. We could assume we have the GCC-style line numbering
information if we had an ending marker for the function, but that's an
assumption. Or we could do it this way: If we are inside a function,
and we found our first line note, use the start address of the function
instead of the address on the line note.
If we do it the first way, we also fix various problems with inlining
(reported to this list a couple of weeks ago). But there's an
assumption in there I really dislike making. Perhaps we could trigger
that off processing_gcc_compilation, hackish as it is, and gain a few
more improvements in addition to this patch. For now, I went with the
second way instead.
Can anyone think of a possible problem? I suppose this might cause
more badness with the section-jumping creativity that the Linux kernel
is so fond of, if it happened to be the very first thing in the
function, but I believe we should always have a line note before any of
that happens.
The results from this patch are very good. In fact, I was astonished.
I'm considering adapting a similar method for DWARF-2; it's less often
necessary but definitely applicable, because the line table does not
indicate function boundaries.
I got the lowest number of unexpected failures I've ever seen with this
patch. I've some way to go with C++/Java, and there's the heap of MI
tests that have been failing as long as I've been running regular
testsuites, and we still haven't resolved the MAYBE_PROTOTYPED and
related changes for the eight or ten failures that causes across my
testsuite runs; but hitting 0 is in sight again now.
Testsuite numbers (across {gcc 2.95.3, gcc 3.0.4} {-gstabs+, -gdwarf-2}):
Current CVS, with Fred's original patch reverted:
=== gdb Summary ===
# of expected passes 31991
# of unexpected failures 358
# of unexpected successes 108
# of expected failures 399
# of unresolved testcases 200
# of untested testcases 24
# of unsupported tests 8
Current CVS, which includes Fred's original patch:
=== gdb Summary ===
# of expected passes 31939
# of unexpected failures 408
# of unexpected successes 108
# of expected failures 392
# of unresolved testcases 212
# of untested testcases 24
# of unsupported tests 8
With the attached patch:
=== gdb Summary ===
# of expected passes 32120
# of unexpected failures 270
# of unexpected successes 108
# of expected failures 399
# of unresolved testcases 100
# of untested testcases 24
# of unsupported tests 8
The only worrysome results were (2.95.3,stabs):
+FAIL: gdb.base/reread.exp: second pass: breakpoint foo in first file
(2.95.3, dwarf-2)
+FAIL: gdb.base/scope.exp: running to foo in runto
+FAIL: gdb.base/scope.exp: running to bar in runto
+FAIL: gdb.base/scope.exp: setting breakpoint at localscopes
The reread failure is present with Fred's patch or with Fred's and
mine; it looks like:
Reading symbols from /opt/src/binutils/x86-as/gdb/testsuite/gdb.base/reread...done.
-Breakpoint 1 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
+Breakpoint 1 at 0x80483dc
(gdb) break foo
-Note: breakpoint 1 also set at pc 0x80483df.
-Breakpoint 2 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
-(gdb) PASS: gdb.base/reread.exp: second pass: breakpoint foo in first file
+Note: breakpoint 1 also set at pc 0x80483dc.
+Breakpoint 2 at 0x80483dc
+(gdb) FAIL: gdb.base/reread.exp: second pass: breakpoint foo in first file
run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /opt/src/binutils/x86-as/gdb/testsuite/gdb.base/reread
+Breakpoint 1 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
+Breakpoint 2 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
That is, after rereading, we think that 0x80483dc is out of function -
and we break there rather than at 0x80483df, where we used to.
scope.exp replaces hitting breakpoint 2 with:
+Program terminated with signal SIGKILL, Killed.
+The program no longer exists.
+You can't do that without a process to debug.
+(gdb) FAIL: gdb.base/scope.exp: running to foo in runto
Which appears to have been temporary, since I can't reproduce it any
more with the exact same binaries.
We seem to be much better at stopping after the prologue with this
patch. And some other breakpoints get earlier. This is because of
changes like:
-Line 13 of "../../../src/gdb/testsuite/gdb.base/ending-run.c" is at
address 0x8048496 <callee+6> but contains no code.
+Line 13 of "../../../src/gdb/testsuite/gdb.base/ending-run.c" starts
at address 0x8048490 <callee> and ends at 0x8048496 <callee+6>.
i.e. the first N_SLINE was placed too late and we now correctly move
it. No breakpoints changed PC in the entire testsuite with GCC 3.x, so
I'm satisfied as to the correctness of the change. I'd appreciate
testsuite results with a non-GCC compiler.
And after all that - OK to commit?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
2002-03-17 Daniel Jacobowitz <drow@mvista.com>
* dbxread.c (process_one_symbol): Extend the first N_SLINE
in a function to cover the entire beginning of the function
as well if it does not already.
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.30
diff -u -p -r1.30 dbxread.c
--- dbxread.c 2002/02/22 00:17:13 1.30
+++ dbxread.c 2002/03/17 06:41:21
@@ -2707,6 +2707,15 @@ process_one_symbol (int type, int desc,
used to relocate these symbol types rather than SECTION_OFFSETS. */
static CORE_ADDR function_start_offset;
+ /* This holds the address of the start of a function, without the system
+ peculiarities of function_start_offset. */
+ static CORE_ADDR last_function_start;
+
+ /* If this is nonzero, we've seen an N_SLINE since the start of the current
+ function. Initialized to nonzero to assure that last_function_start
+ is never used uninitialized. */
+ static int sline_found_in_function = 1;
+
/* If this is nonzero, we've seen a non-gcc N_OPT symbol for this source
file. Used to detect the SunPRO solaris compiler. */
static int n_opt_found;
@@ -2758,9 +2767,13 @@ process_one_symbol (int type, int desc,
break;
}
+ sline_found_in_function = 0;
+
/* Relocate for dynamic loading */
valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
valu = SMASH_TEXT_ADDRESS (valu);
+ last_function_start = valu;
+
goto define_a_symbol;
case N_LBRAC:
@@ -2953,7 +2966,15 @@ process_one_symbol (int type, int desc,
#ifdef SUN_FIXED_LBRAC_BUG
last_pc_address = valu; /* Save for SunOS bug circumcision */
#endif
- record_line (current_subfile, desc, valu);
+ /* If this is the first SLINE note in the function, record it at
+ the start of the function instead of at the listed location. */
+ if (within_function && sline_found_in_function == 0)
+ {
+ record_line (current_subfile, desc, last_function_start);
+ sline_found_in_function = 1;
+ }
+ else
+ record_line (current_subfile, desc, valu);
break;
case N_BCOMM:
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-16 22:51 ` [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak) Daniel Jacobowitz
@ 2002-03-18 13:44 ` Daniel Jacobowitz
2002-03-20 12:30 ` Andrew Cagney
2002-03-21 11:03 ` Jim Blandy
2 siblings, 0 replies; 17+ messages in thread
From: Daniel Jacobowitz @ 2002-03-18 13:44 UTC (permalink / raw)
To: fnf, Jim Blandy, Mark Kettenis, gdb-patches
On Sun, Mar 17, 2002 at 01:48:16AM -0500, Daniel Jacobowitz wrote:
> 2002-03-17 Daniel Jacobowitz <drow@mvista.com>
>
> * dbxread.c (process_one_symbol): Extend the first N_SLINE
> in a function to cover the entire beginning of the function
> as well if it does not already.
By the way, this fixes PRs 379, 380, 381.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-16 22:51 ` [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak) Daniel Jacobowitz
2002-03-18 13:44 ` Daniel Jacobowitz
@ 2002-03-20 12:30 ` Andrew Cagney
2002-03-21 10:00 ` Jim Blandy
2002-03-21 11:03 ` Jim Blandy
2 siblings, 1 reply; 17+ messages in thread
From: Andrew Cagney @ 2002-03-20 12:30 UTC (permalink / raw)
To: Jim Blandy; +Cc: Daniel Jacobowitz, fnf, Mark Kettenis, gdb-patches
> [This is long. Feel free to skip to the patch at the very end, and
> stop to take a gander at the testsuite numbers in the middle :)]
>
> On Wed, Feb 27, 2002 at 04:20:05PM -0700, Fred Fish wrote:
>
>> > Fred, could you look into these failures?
>
>>
>> Yes, but I would need access to a host system that exhibits
>> the failures. Given a pointer and access to such a system,
>> I can try and see what is going on.
>
>
> I've got it. It's almost exactly like the bug I fixed in binutils
> addr2line a few hours ago. We do not have an N_SLINE at the beginning
> of the function. Our starting lines for functions have, as a result,
> always been a little odd...
Jim, would you be able to bump this one up a bit on your things to do
list? I believe it addresses the regressions MichaelC detected just
prior to 5.2 being branched and is on the high priority list.
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-20 12:30 ` Andrew Cagney
@ 2002-03-21 10:00 ` Jim Blandy
0 siblings, 0 replies; 17+ messages in thread
From: Jim Blandy @ 2002-03-21 10:00 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Daniel Jacobowitz, fnf, Mark Kettenis, gdb-patches
Andrew Cagney <ac131313@cygnus.com> writes:
> > [This is long. Feel free to skip to the patch at the very end, and
> > stop to take a gander at the testsuite numbers in the middle :)]
> > On Wed, Feb 27, 2002 at 04:20:05PM -0700, Fred Fish wrote:
> >
> >> > Fred, could you look into these failures?
> >
> >> Yes, but I would need access to a host system that exhibits
> >> the failures. Given a pointer and access to such a system,
> >> I can try and see what is going on.
> > I've got it. It's almost exactly like the bug I fixed in binutils
> > addr2line a few hours ago. We do not have an N_SLINE at the beginning
> > of the function. Our starting lines for functions have, as a result,
> > always been a little odd...
>
> Jim, would you be able to bump this one up a bit on your things to do
> list? I believe it addresses the regressions MichaelC detected just
> prior to 5.2 being branched and is on the high priority list.
Yes, I've been sort of panicing this week, but I think this might be
valuable to the project I'm currenty panicing about. I'll probably
get to it today.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-16 22:51 ` [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak) Daniel Jacobowitz
2002-03-18 13:44 ` Daniel Jacobowitz
2002-03-20 12:30 ` Andrew Cagney
@ 2002-03-21 11:03 ` Jim Blandy
2002-03-21 12:56 ` Andrew Cagney
2002-03-21 12:57 ` Daniel Jacobowitz
2 siblings, 2 replies; 17+ messages in thread
From: Jim Blandy @ 2002-03-21 11:03 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: fnf, Mark Kettenis, gdb-patches
This looks sound to me. Let's put it in and see what happens.
Daniel Jacobowitz <drow@mvista.com> writes:
> [This is long. Feel free to skip to the patch at the very end, and
> stop to take a gander at the testsuite numbers in the middle :)]
>
> On Wed, Feb 27, 2002 at 04:20:05PM -0700, Fred Fish wrote:
> > > Fred, could you look into these failures?
> >
> > Yes, but I would need access to a host system that exhibits
> > the failures. Given a pointer and access to such a system,
> > I can try and see what is going on.
>
> I've got it. It's almost exactly like the bug I fixed in binutils
> addr2line a few hours ago. We do not have an N_SLINE at the beginning
> of the function. Our starting lines for functions have, as a result,
> always been a little odd...
>
> So how do we figure out where we are? There's two ways. GCC gives us
> the line number of the start of the function in the N_FUN, but other
> compilers don't. Also, every function should contain at least one
> line number note. We could assume we have the GCC-style line numbering
> information if we had an ending marker for the function, but that's an
> assumption. Or we could do it this way: If we are inside a function,
> and we found our first line note, use the start address of the function
> instead of the address on the line note.
>
> If we do it the first way, we also fix various problems with inlining
> (reported to this list a couple of weeks ago). But there's an
> assumption in there I really dislike making. Perhaps we could trigger
> that off processing_gcc_compilation, hackish as it is, and gain a few
> more improvements in addition to this patch. For now, I went with the
> second way instead.
>
> Can anyone think of a possible problem? I suppose this might cause
> more badness with the section-jumping creativity that the Linux kernel
> is so fond of, if it happened to be the very first thing in the
> function, but I believe we should always have a line note before any of
> that happens.
>
> The results from this patch are very good. In fact, I was astonished.
> I'm considering adapting a similar method for DWARF-2; it's less often
> necessary but definitely applicable, because the line table does not
> indicate function boundaries.
>
> I got the lowest number of unexpected failures I've ever seen with this
> patch. I've some way to go with C++/Java, and there's the heap of MI
> tests that have been failing as long as I've been running regular
> testsuites, and we still haven't resolved the MAYBE_PROTOTYPED and
> related changes for the eight or ten failures that causes across my
> testsuite runs; but hitting 0 is in sight again now.
>
> Testsuite numbers (across {gcc 2.95.3, gcc 3.0.4} {-gstabs+, -gdwarf-2}):
>
> Current CVS, with Fred's original patch reverted:
> === gdb Summary ===
>
> # of expected passes 31991
> # of unexpected failures 358
> # of unexpected successes 108
> # of expected failures 399
> # of unresolved testcases 200
> # of untested testcases 24
> # of unsupported tests 8
>
> Current CVS, which includes Fred's original patch:
> === gdb Summary ===
>
> # of expected passes 31939
> # of unexpected failures 408
> # of unexpected successes 108
> # of expected failures 392
> # of unresolved testcases 212
> # of untested testcases 24
> # of unsupported tests 8
>
> With the attached patch:
> === gdb Summary ===
>
> # of expected passes 32120
> # of unexpected failures 270
> # of unexpected successes 108
> # of expected failures 399
> # of unresolved testcases 100
> # of untested testcases 24
> # of unsupported tests 8
>
>
> The only worrysome results were (2.95.3,stabs):
> +FAIL: gdb.base/reread.exp: second pass: breakpoint foo in first file
>
> (2.95.3, dwarf-2)
> +FAIL: gdb.base/scope.exp: running to foo in runto
> +FAIL: gdb.base/scope.exp: running to bar in runto
> +FAIL: gdb.base/scope.exp: setting breakpoint at localscopes
>
> The reread failure is present with Fred's patch or with Fred's and
> mine; it looks like:
> Reading symbols from /opt/src/binutils/x86-as/gdb/testsuite/gdb.base/reread...done.
> -Breakpoint 1 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
> +Breakpoint 1 at 0x80483dc
> (gdb) break foo
> -Note: breakpoint 1 also set at pc 0x80483df.
> -Breakpoint 2 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
> -(gdb) PASS: gdb.base/reread.exp: second pass: breakpoint foo in first file
> +Note: breakpoint 1 also set at pc 0x80483dc.
> +Breakpoint 2 at 0x80483dc
> +(gdb) FAIL: gdb.base/reread.exp: second pass: breakpoint foo in first file
> run
> The program being debugged has been started already.
> Start it from the beginning? (y or n) y
> Starting program: /opt/src/binutils/x86-as/gdb/testsuite/gdb.base/reread
> +Breakpoint 1 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
> +Breakpoint 2 at 0x80483df: file ../../../src/gdb/testsuite/gdb.base/reread1.c, line 14.
>
>
> That is, after rereading, we think that 0x80483dc is out of function -
> and we break there rather than at 0x80483df, where we used to.
>
>
> scope.exp replaces hitting breakpoint 2 with:
> +Program terminated with signal SIGKILL, Killed.
> +The program no longer exists.
> +You can't do that without a process to debug.
> +(gdb) FAIL: gdb.base/scope.exp: running to foo in runto
>
> Which appears to have been temporary, since I can't reproduce it any
> more with the exact same binaries.
>
> We seem to be much better at stopping after the prologue with this
> patch. And some other breakpoints get earlier. This is because of
> changes like:
> -Line 13 of "../../../src/gdb/testsuite/gdb.base/ending-run.c" is at
> address 0x8048496 <callee+6> but contains no code.
> +Line 13 of "../../../src/gdb/testsuite/gdb.base/ending-run.c" starts
> at address 0x8048490 <callee> and ends at 0x8048496 <callee+6>.
>
> i.e. the first N_SLINE was placed too late and we now correctly move
> it. No breakpoints changed PC in the entire testsuite with GCC 3.x, so
> I'm satisfied as to the correctness of the change. I'd appreciate
> testsuite results with a non-GCC compiler.
>
>
>
> And after all that - OK to commit?
>
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
>
> 2002-03-17 Daniel Jacobowitz <drow@mvista.com>
>
> * dbxread.c (process_one_symbol): Extend the first N_SLINE
> in a function to cover the entire beginning of the function
> as well if it does not already.
>
> Index: dbxread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dbxread.c,v
> retrieving revision 1.30
> diff -u -p -r1.30 dbxread.c
> --- dbxread.c 2002/02/22 00:17:13 1.30
> +++ dbxread.c 2002/03/17 06:41:21
> @@ -2707,6 +2707,15 @@ process_one_symbol (int type, int desc,
> used to relocate these symbol types rather than SECTION_OFFSETS. */
> static CORE_ADDR function_start_offset;
>
> + /* This holds the address of the start of a function, without the system
> + peculiarities of function_start_offset. */
> + static CORE_ADDR last_function_start;
> +
> + /* If this is nonzero, we've seen an N_SLINE since the start of the current
> + function. Initialized to nonzero to assure that last_function_start
> + is never used uninitialized. */
> + static int sline_found_in_function = 1;
> +
> /* If this is nonzero, we've seen a non-gcc N_OPT symbol for this source
> file. Used to detect the SunPRO solaris compiler. */
> static int n_opt_found;
> @@ -2758,9 +2767,13 @@ process_one_symbol (int type, int desc,
> break;
> }
>
> + sline_found_in_function = 0;
> +
> /* Relocate for dynamic loading */
> valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
> valu = SMASH_TEXT_ADDRESS (valu);
> + last_function_start = valu;
> +
> goto define_a_symbol;
>
> case N_LBRAC:
> @@ -2953,7 +2966,15 @@ process_one_symbol (int type, int desc,
> #ifdef SUN_FIXED_LBRAC_BUG
> last_pc_address = valu; /* Save for SunOS bug circumcision */
> #endif
> - record_line (current_subfile, desc, valu);
> + /* If this is the first SLINE note in the function, record it at
> + the start of the function instead of at the listed location. */
> + if (within_function && sline_found_in_function == 0)
> + {
> + record_line (current_subfile, desc, last_function_start);
> + sline_found_in_function = 1;
> + }
> + else
> + record_line (current_subfile, desc, valu);
> break;
>
> case N_BCOMM:
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-21 11:03 ` Jim Blandy
@ 2002-03-21 12:56 ` Andrew Cagney
2002-03-25 14:37 ` Jim Blandy
2002-03-21 12:57 ` Daniel Jacobowitz
1 sibling, 1 reply; 17+ messages in thread
From: Andrew Cagney @ 2002-03-21 12:56 UTC (permalink / raw)
To: Jim Blandy; +Cc: Daniel Jacobowitz, fnf, Mark Kettenis, gdb-patches
> This looks sound to me. Let's put it in and see what happens.
Was that trunk or branch? I can understand a suck-it-and-see approach
for the trunk but not for the branch :-/
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-21 12:56 ` Andrew Cagney
@ 2002-03-25 14:37 ` Jim Blandy
0 siblings, 0 replies; 17+ messages in thread
From: Jim Blandy @ 2002-03-25 14:37 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Daniel Jacobowitz, fnf, Mark Kettenis, gdb-patches
Andrew Cagney <ac131313@cygnus.com> writes:
> > This looks sound to me. Let's put it in and see what happens.
>
> Was that trunk or branch? I can understand a suck-it-and-see approach
> for the trunk but not for the branch :-/
I have to admit, changes to this area of code have further-reaching
effects than I usually expect. Definitely for the trunk. Perhaps if
someone tracks down the regressions that Daniel noted, we could
include it in the branch, too.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-21 11:03 ` Jim Blandy
2002-03-21 12:56 ` Andrew Cagney
@ 2002-03-21 12:57 ` Daniel Jacobowitz
2002-03-21 15:28 ` Andrew Cagney
1 sibling, 1 reply; 17+ messages in thread
From: Daniel Jacobowitz @ 2002-03-21 12:57 UTC (permalink / raw)
To: gdb-patches
On Thu, Mar 21, 2002 at 02:03:44PM -0500, Jim Blandy wrote:
>
> This looks sound to me. Let's put it in and see what happens.
Committed. If everything seems OK in a little while (a week, say?)
I'll move it to the branch.
As I said, I was going to do the exact same thing for DWARF-2.
Unfortunately... this is hard to do efficiently. We don't process
functions at the same time as line numbers. For working around a
compiler bug, it's probably not worthwhile.
I could do the equivalent of Fred's original patch for DWARF-2, at
DW_LNS_end_sequence; there's a comment there saying we can not record
the end of a line, but now we can. On the other hand, it will
introduce the same problem with broken debug output that we observed in
stabs. So I'm not going to do that until I think of an efficient way
to handle it. Despite the clutter, I'd prefer to deal with this error
gracefully, now that it's "out there" in quantity.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak)
2002-03-21 12:57 ` Daniel Jacobowitz
@ 2002-03-21 15:28 ` Andrew Cagney
0 siblings, 0 replies; 17+ messages in thread
From: Andrew Cagney @ 2002-03-21 15:28 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> On Thu, Mar 21, 2002 at 02:03:44PM -0500, Jim Blandy wrote:
>
>>
>> This looks sound to me. Let's put it in and see what happens.
>
>
> Committed. If everything seems OK in a little while (a week, say?)
> I'll move it to the branch.
>
> As I said, I was going to do the exact same thing for DWARF-2.
> Unfortunately... this is hard to do efficiently. We don't process
> functions at the same time as line numbers. For working around a
> compiler bug, it's probably not worthwhile.
It needs to at least get past MichaelC's testing :-)
I think I'm going to slip 5.2 by a week (to 2002-04-14ish). Mainly
because one weekend before (2002-03-31) - when I should seeing that this
sort of stuff gets pulled in - I'll be on holidays :-)
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFC] Gdb line table implementation tweak
@ 2002-02-23 13:52 Michael Elizabeth Chastain
0 siblings, 0 replies; 17+ messages in thread
From: Michael Elizabeth Chastain @ 2002-02-23 13:52 UTC (permalink / raw)
To: jimb, kettenis; +Cc: fnf, gdb-patches
I'm seeing the same bugs on:
[target=native host=i686-pc-linux-gnu%rh-7.2 gdb=HEAD%20020222 gcc=2.95.3 glibc=vendor goption=-gstabs+]
It looks like two bugs, or maybe two manifestations of the same underlying
bug. One manifestation is that the "step" command does not step into
the function being called. The other manifestation is a lot of messages
such as "No line number known for main."
It did not happen with gdb=HEAD%20020216 in the same configuration so it's
a recent regression. Also, gcc 2.95.3 -gdwarf-2 works fine, as do all the
gcc v3 compilers (with both dwarf-2 and stabs).
I am filing PR's in a few hours with log excerpts and stuff.
Michael C
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [RFC] Gdb line table implementation tweak
@ 2002-02-27 16:45 Michael Elizabeth Chastain
0 siblings, 0 replies; 17+ messages in thread
From: Michael Elizabeth Chastain @ 2002-02-27 16:45 UTC (permalink / raw)
To: fnf; +Cc: gdb-patches
I'm getting similar failures on:
[target=native host=i686-pc-linux-gnu%rh-7.2 gdb=HEAD%2002-02-26
gcc=2.95.3 glibc=vendor goption=-g-stabs+]
I put up a gdb.log and gdb.sum file on:
ftp://ftp.shout.net/pub/users/mec/step-bug/gdb.sum
ftp://ftp.shout.net/pub/users/mec/step-bug/gdb.log
A good example of the bad behavior is:
gdb.base/step-test: large struct by value
gdb tries to step into a function but instead it steps somewhere else.
For me, the bug is specific to gcc 2.95.3 and stabs debugging format.
Michael C
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2002-03-25 22:37 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-12 16:28 [RFC] Gdb line table implementation tweak Fred Fish
2002-02-13 7:10 ` Daniel Jacobowitz
2002-02-21 12:50 ` Jim Blandy
2002-02-23 13:37 ` Mark Kettenis
2002-02-27 13:43 ` Jim Blandy
2002-02-27 15:24 ` Fred Fish
2002-03-16 22:51 ` [RFA/stabs] Fix for line table problems (was: Re: [RFC] Gdb line table implementation tweak) Daniel Jacobowitz
2002-03-18 13:44 ` Daniel Jacobowitz
2002-03-20 12:30 ` Andrew Cagney
2002-03-21 10:00 ` Jim Blandy
2002-03-21 11:03 ` Jim Blandy
2002-03-21 12:56 ` Andrew Cagney
2002-03-25 14:37 ` Jim Blandy
2002-03-21 12:57 ` Daniel Jacobowitz
2002-03-21 15:28 ` Andrew Cagney
2002-02-23 13:52 [RFC] Gdb line table implementation tweak Michael Elizabeth Chastain
2002-02-27 16:45 Michael Elizabeth Chastain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox