From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Wood To: Jim Blandy Cc: gdb@sources.redhat.com Subject: Re: RFC c++ debugging thread (fwd) Date: Wed, 04 Jul 2001 05:15:00 -0000 Message-id: <20010704141527.B17190@alinoe.com> References: X-SW-Source: 2001-07/msg00021.html 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