This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: RFC c++ debugging thread (fwd)
- To: Carlo Wood <carlo at alinoe dot com>
- Subject: Re: RFC c++ debugging thread (fwd)
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: 04 Jul 2001 11:27:58 -0500
- Cc: gdb at sources dot redhat dot com
- References: <Pine.SOL.3.91.1010702120615.3597C-100000@taarna.cygnus.com><npelryrkb2.fsf@zwingli.cygnus.com> <20010704141527.B17190@alinoe.com>
Great --- I've reproduced this. Thanks very much.
This is definitely a case where GCC isn't providing us with the info,
and we're not ready to consume it.
Carlo Wood <carlo@alinoe.com> writes:
>
> On Mon, Jul 02, 2001 at 06:19:13PM -0500, Jim Blandy wrote:
> > We have test cases for some problems, and although your problem sounds
> > similar, I can't be sure it's exactly the same problem you are seeing.
> > Could you put together a test case, show us what GDB does, and tell us
> > what you wish it did? Post to gdb@sources.redhat.com.
>
> Well, this is hard to produce from the top of my head in a small
> example program. But I'll try next time I run into it.
>
> Here is one example for a start:
>
> ~>cat test.cc
> namespace foo {
>
> void g(void)
> {
> }
>
> void f(void)
> {
> g();
> }
> }
>
> int main(void)
> {
> foo::f();
> return 0;
> }
> ~>g++-3.0 -g test.cc
> ~>gdb a.out
> GNU gdb 5.0rh-5 Red Hat Linux 7.1
> Copyright 2001 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-redhat-linux"...
> (gdb) b main
> Breakpoint 1 at 0x8048626: file test.cc, line 15.
> (gdb) r
> Starting program: /home/carlo/c++/libcw/src/libcwd/a.out
>
> Breakpoint 1, main () at test.cc:15
> 15 foo::f();
> Current language: auto; currently c++
> (gdb) s
> foo::f() () at test.cc:9
> 9 g();
> (gdb) b g
> Function "g" not defined.
>
> --
> Carlo Wood <carlo@alinoe.com>
>