public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Richter <thor@math.TU-Berlin.DE>
To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org
Subject: c++/9366: g++-3.2 does not generate proper debugging information for sub-classes with virtual members
Date: Sun, 19 Jan 2003 15:36:00 -0000	[thread overview]
Message-ID: <200301191527.QAA00759@cleopatra.math.tu-berlin.de> (raw)


>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:


                 reply	other threads:[~2003-01-19 15:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301191527.QAA00759@cleopatra.math.tu-berlin.de \
    --to=thor@math.tu-berlin.de \
    --cc=debian-gcc@lists.debian.org \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).