This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


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

Re: RFC c++ debugging thread (fwd)



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


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