public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* need correct options/versions to allow debugging with namespaces
@ 2002-08-02  9:00 John Clinton
  2002-08-02  9:07 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: John Clinton @ 2002-08-02  9:00 UTC (permalink / raw)
  To: gcc-help, gdb

First my configuration:

uname -a gives....

Linux hitman.aristoslogic.com 2.4.17 #3 SMP Tue Jan 29 10:52:19 PST 2002
i686 unknown


gcc -v gives....

Reading specs from
/proj/alctools/gcc/linux_i386_bu_3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/s
pecs
Configured with:
../gcc-3.1.1/configure --prefix=/proj/alctools/gcc/linux_i386_bu_3.1.1 --dis
able-shared --enable-static --enable-long-long --enable-languages=c++ --enab
le-threads=posix --with-gnu-as --with-as=/proj/alctools/binutils/linux_i386_
2.12/bin/as --with-gnu-ld --with-ld=/proj/alctools/binutils/linux_i386_2.12/
bin/ld
Thread model: posix
gcc version 3.1.1

(Note this gcc uses the 2.12 version of binutils)


and gdb -v gives....

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


===================================================================

I compiled my own code using the -gdwarf-2 and -g3 options
(I've also tried a number of other similar -g options).

When in the debugger I type:
	print *this when stopped in some class method I get:

(gdb) print *this
can't find class named `drv::FibreSliceDriver', as given by C++ RTTI

I can print local variables in the functions, but no class members.

I had seen some earlier (six or more months ago) postings about
namespace problems with gdb.  Some suggested that with dwarf-2 support
this would work.

Is there some way with the correct gcc or gdb version and/or with
some needed option when compiling to make debugging classes within
namespaces work correctly?

Thanks for any clues on this!

--John
j.clinton@aristoslogic.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: need correct options/versions to allow debugging with namespaces
  2002-08-02  9:00 need correct options/versions to allow debugging with namespaces John Clinton
@ 2002-08-02  9:07 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2002-08-02  9:07 UTC (permalink / raw)
  To: John Clinton; +Cc: gcc-help, gdb

On Fri, Aug 02, 2002 at 09:00:34AM -0700, John Clinton wrote:
> First my configuration:
> 
> uname -a gives....
> 
> Linux hitman.aristoslogic.com 2.4.17 #3 SMP Tue Jan 29 10:52:19 PST 2002
> i686 unknown
> 
> 
> gcc -v gives....
> 
> Reading specs from
> /proj/alctools/gcc/linux_i386_bu_3.1.1/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/s
> pecs
> Configured with:
> ../gcc-3.1.1/configure --prefix=/proj/alctools/gcc/linux_i386_bu_3.1.1 --dis
> able-shared --enable-static --enable-long-long --enable-languages=c++ --enab
> le-threads=posix --with-gnu-as --with-as=/proj/alctools/binutils/linux_i386_
> 2.12/bin/as --with-gnu-ld --with-ld=/proj/alctools/binutils/linux_i386_2.12/
> bin/ld
> Thread model: posix
> gcc version 3.1.1
> 
> (Note this gcc uses the 2.12 version of binutils)
> 
> 
> and gdb -v gives....
> 
> 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".
> 
> 
> ===================================================================
> 
> I compiled my own code using the -gdwarf-2 and -g3 options
> (I've also tried a number of other similar -g options).
> 
> When in the debugger I type:
> 	print *this when stopped in some class method I get:
> 
> (gdb) print *this
> can't find class named `drv::FibreSliceDriver', as given by C++ RTTI
> 
> I can print local variables in the functions, but no class members.
> 
> I had seen some earlier (six or more months ago) postings about
> namespace problems with gdb.  Some suggested that with dwarf-2 support
> this would work.
> 
> Is there some way with the correct gcc or gdb version and/or with
> some needed option when compiling to make debugging classes within
> namespaces work correctly?

Nope, not yet.

You will probably have better luck with CVS GDB than 5.2.1, but I don't
expect namespace debugging to work properly until someone has time to
spend on it, and I haven't for a couple of months.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-02 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-02  9:00 need correct options/versions to allow debugging with namespaces John Clinton
2002-08-02  9:07 ` Daniel Jacobowitz

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