[comp.lang.c++] Which C++ compiler?

ecl2v@Virginia.EDU (Edmond C. Loyot) (11/03/90)

We are trying to decide which C++ compiler to purchase.  Our hardware
platform is a Sun3/60 running SunOS 4.1 with X windows.  The things we
are most concerned with are:

	1) Does the product include a debugger (that doesn't use mangled
	   names)?

	2) Is there adequate technical support?

	3) Does the product fit in well with SunOS/X windows environment?

	4) How portable is the product?

We are currently considering Sun C++, OASYS(Greenhills?) C++, ParcPlace C++
and Oregon C++.  If anyone has used any of these products we would appreciate
any comments or recommendations.

Please reply via e-mail to:

	Ed Loyot
	University of Virginia
	Dept. of Computer Science
	ecl2v@Virginia.EDU

Thanks!

sdm@cs.brown.edu (Scott Meyers) (11/06/90)

In article <1990Nov2.164530.1862@murdoch.acc.Virginia.EDU> ecl2v@Virginia.EDU (Edmond C. Loyot) writes:
>We are trying to decide which C++ compiler to purchase.  Our hardware
>
>	1) Does the product include a debugger (that doesn't use mangled
>	   names)?

Demangling names is just the tip of the iceberg.  When you look at a C++
debugger, ask your vender these questions:

    - Can the debugger print the dynamic types of pointers and references?
    - Can it set breakpoints and/or step through:
        - inline functions?
        - virtual functions, including pure virtual functions?
        - member initialization lists?
    - Can it display all the members of an object, including those that are
      inherited?  
    - Can it display members of an object when those members are inherited
      from a virtual base class?

For what it's worth, the only debugger that I know of that can do all these
things is the HP C++ debugger, and I'm not even sure that the version that
does all this stuff is available to customers yet.  Information on the HP
C++ debugger can be found in the paper, "C++ Symbolic Debugging," presented
in September at C++ at Work-'90, pp. 109--120.

This isn't an ad for HP, I don't work for them, I don't even have their
software.  If there are other debuggers that do everything listed above,
please post that information to the net -- I'm sure many people would be
interested. 

Scott

vaughan@mcc.com (Paul Vaughan) (11/06/90)

   From: sdm@cs.brown.edu (Scott Meyers)
   Newsgroups: comp.lang.c++
   Date: 5 Nov 90 19:02:45 GMT
   References: <1990Nov2.164530.1862@murdoch.acc.Virginia.EDU>
   Reply-To: sdm@cs.brown.edu (Scott Meyers)
   Organization: Brown University Department of Computer Science
   Lines: 31

   In article <1990Nov2.164530.1862@murdoch.acc.Virginia.EDU> ecl2v@Virginia.EDU (Edmond C. Loyot) writes:
   >We are trying to decide which C++ compiler to purchase.  Our hardware
   >
   >	1) Does the product include a debugger (that doesn't use mangled
   >	   names)?

   Demangling names is just the tip of the iceberg.  When you look at a C++
   debugger, ask your vender these questions:

       - Can the debugger print the dynamic types of pointers and references?
       - Can it set breakpoints and/or step through:
	   - inline functions?
	   - virtual functions, including pure virtual functions?
	   - member initialization lists?
       - Can it display all the members of an object, including those that are
	 inherited?  
       - Can it display members of an object when those members are inherited
	 from a virtual base class?

No kidding. I'd add a lot of things that should be part of a complete
interpreter for interactive expressions.  The standard C subset
interpreter approach just doesn't cut it these days with C++.

	- call virtual functions on demand (inherited from virtual
							base classes?)
	- call inline functions on demand
	- deal with classes compiled without -g, including
		- call functions with arguments that are pointers to
		such classes
		- display objects inherited from them
	
	- set breakpoints on constructors and destructors
	- deal well with const member functions
	- call overloaded functions correctly
	- handle temporary objects when evaluating
		expressions interactively
	- handle type conversions in interactive expressions including
		using user defined type conversions
	
	
I've been working with g++ and gdb on a system that has the ability to
dynamically compile and load stuff and I find I sometimes have to
resort to using that capability instead of gdb just to evaluate a
simple expression. gdb does handle demangling names just fine, though.

And don't forget, the compiler/debugger combination has got to do all
this fast without bloating your code with debugging information by
more than 5 times.



 Paul Vaughan, MCC CAD Program | ARPA: vaughan@mcc.com | Phone: [512] 338-3639
 Box 200195, Austin, TX 78720  | UUCP: ...!cs.utexas.edu!milano!cadillac!vaughan

shankar@hpclscu.HP.COM (Shankar Unni) (11/15/90)

> Demangling names is just the tip of the iceberg.  When you look at a C++
> debugger, ask your vender these questions:
> 
>     - Can the debugger print the dynamic types of pointers and references?
>     - Can it set breakpoints and/or step through:
>         - inline functions?
>         - virtual functions, including pure virtual functions?
>         - member initialization lists?
>     - Can it display all the members of an object, including those that are
>       inherited?  
>     - Can it display members of an object when those members are inherited
>       from a virtual base class?
> 
> For what it's worth, the only debugger that I know of that can do all these
> things is the HP C++ debugger, and I'm not even sure that the version that
> does all this stuff is available to customers yet.  Information on the HP
> C++ debugger can be found in the paper, "C++ Symbolic Debugging," presented
> in September at C++ at Work-'90, pp. 109--120.

The version of HP C++ released earlier this year (Summer) does all this.
The version coming out with the upcoming release of our 2.1-based HPC++
will also have some support for nested types.

One caveat, though: support for inline functions that are actually inlined
is somewhat poor - to get the fullest benefit, the compilation units where
you want to do such debugging should be compiled with "+d". Future versions
may have "real" support for truly-inlined functions.
-----
Shankar Unni                                   E-Mail: 
Hewlett-Packard California Language Lab.     Internet: shankar@hpda.hp.com
Phone : (408) 447-5797                           UUCP: ...!hplabs!hpda!shankar

Standard Disclaimer:
This response does not represent the official position of, or statement by,
the Hewlett-Packard Company.  The above data is provided for informational
purposes only.  It is supplied without warranty of any kind.