This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: C++ Overload testsuite fixes, need someone to verify


Jimmy Guo <guo@cup.hp.com> writes:

It is a debug info problem.

GNU gdb 20000204
Copyright 1998 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 "i386-unknown-freebsdelf4.0".
(gdb) file testsuite/gdb.c++/ovldbreak
Reading symbols from testsuite/gdb.c++/ovldbreak...done.
(gdb) b main
Breakpoint 1 at 0x804882f: file ./gdb.c++/ovldbreak.cc, line 48.
(gdb) bash-2.03#
bash-2.03# g++ -v
Using builtin specs.
gcc version 2.95.2 19991024 (release)


That's with STABS (or dwarf1, i forget the default, might be dwarf1).

bash-2.03# ./gdb -nw a.out
GNU gdb 20000204
Copyright 1998 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 "i386-unknown-freebsdelf4.0"...
Setting up the environment for debugging gdb.
.gdbinit:5: Error in sourced command file:
Function "internal_error" not defined.
(gdb) b main
During symbol reading, type qualifier 'const' ignored.
Breakpoint 1 at 0x804883c: file testsuite/gdb.c++/ovldbreak.cc, line 49.
(gdb)

That's with DWARF2.


Can someone please grant me the sage wisdom about what to do about
this?

Modify the regexp to accept 48/49, or just pout in the corner and
live with the testsuite failures for now?


--Dan
> Might be.  I just checked sourceware 3/21's gdb built for
> hppa1.1-hp-hpux10.20, with ovldbreak.cc compiled by GNUPro g++, and it
> reports breakpoint on main at line 49.  This seem to point to the
> compiler rather than the debugger that you are using.
> 
> - Jimmy Guo, guo@cup.hp.com
> 
> >Jimmy Guo <guo@cup.hp.com> writes:
> >
> >the "{" is on line 48, the first line of the code ("char arg1") is at
> >49.
> >I smell a debugging info issue, where your compiler says it starts at
> >49, and mine says 48.
> >I think the real solution is to accept 48 and 49, but say anything
> >else is wrong.
> >Or fix gcc, if it's broken.
> >Something is telling me i remember seeing something about this problem
> >in gcc recently, something about where it's saying the first line of a
> >functions starts.
> >Can any of the GCC guys tell me if i'm making this up in my head (I
> >believe it was related to where it put the note about the function
> >start or something like that)?
> >--Dan
> >> >Can someone verify, that i am correct in thinking you get unexpected
> >> >failures in gdb.c++/ovldbreak.exp due to "breakpoint info" failures?
> >> >I have a patch, i just want to make sure it's not me.
> >> >It appears the source line the test suite expects main to appear on
> >> >in that file is 49, and main really appears at 48, so the regex to
> >> >match doesn't work.  I diffed the ovldbreak.cc file, and i get no
> >> >differences.
> >> 
> >> I think it should report 49, not 48.  Line 49 is the first executable
> >> statement of main.  I'm using the HP WDB source, in case you cannot see
> >> such behavior with sourceware's (in that case I will spend some time
> >> digging up the fix to submit as a patch).
> >> 
> >> - Jimmy Guo

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