public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9366: g++-3.2 does not generate proper debugging information for sub-classes with virtual members
@ 2003-01-19 15:36 Thomas Richter
  0 siblings, 0 replies; only message in thread
From: Thomas Richter @ 2003-01-19 15:36 UTC (permalink / raw)
  To: gcc-gnats, debian-gcc


>Number:         9366
>Category:       c++
>Synopsis:       g++-3.2 does not generate proper debugging information for sub-classes with virtual members
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 19 15:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Richter
>Release:        3.2.1 20020924 (Debian prerelease) (Debian testing/unstable)
>Organization:
TU-Berlin
>Environment:
System: Linux skywise 2.4.18 #25 Sam Dez 14 12:49:23 CET 2002 i686 unknown
Architecture: i686

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: /mnt/data/gcc-3.1/gcc-3.2-3.2.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-java-gc=boehm --enable-objc-gc i386-linux
>Description:
Save the following code as "foo.cpp":
/* snip */

struct Menu {
  class ButtonGadget {
  public:
    virtual bool HitTest(void);
  };
};

bool Menu::ButtonGadget::HitTest(void)
{
  return false;
}

int main(int argc,char **argv)
{
  return 0;
}

/* snip */

With the instructions given below, gdb (GNU gdb 5.2.1) will not be able
to find the method "Menu::ButtonGadget::HitTest". This might also be a
gdb problem.

>How-To-Repeat:
Save the above code, then compile it with
$ g++-3.2 -O0 -ggdb foo.cpp
The result will be an "a.out" file. Run gdb as follows:
$ gdb a.out
Then try to set a breakpoint at "Menu::ButtonGadget::HitTest".
This command will result in:
GNU gdb 5.2.1
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) list
6       };
7
8       bool Menu::ButtonGadget::HitTest(void)
9       {
10        return false;
11      }
12
13      int main(int argc,char **argv)
14      {
15        return 0;
(gdb) break Menu::ButtonGadget::HitTest
the class Menu does not have any method named ButtonGadget
Hint: try 'Menu::ButtonGadget::HitTest<TAB> or 'Menu::ButtonGadget::HitTest<ESC-?>
(Note leading single quote.)
(gdb) 
>Fix:
No known fix available.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-19 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-19 15:36 c++/9366: g++-3.2 does not generate proper debugging information for sub-classes with virtual members Thomas Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).