Debugging C++ progs on SUN systems

Debugging C++ progs on SUN systems

Post by Chowdary Man » Wed, 17 Nov 1993 08:13:12



Hi

I am having problems debugging my C++ programs using the dbx on SUN.
I'm using the AT&T C++ translator (CC) for compiling. Like it is said in
the manpages, I'm passing the -g option to the CC, for including additional
symbol table info in the .o files.

But, when I use that source (.cc) file in dbx, it says 'File jfhd.cc not compiled
with -g option'.

I would appreciate if any of you who have used CC and dbx, can help me in this.

Thanx

Sagar.

 
 
 

Debugging C++ progs on SUN systems

Post by Pete Flugst » Fri, 19 Nov 1993 03:40:39



Quote:>But, when I use that source (.cc) file in dbx, it says 'File jfhd.cc not compiled
>with -g option'.

Make sure you are using the right dbx, the one that came with the C++ translator.
Sun's version of this translator requires that you use a different de* in
order to understand it at all.

Pete

 
 
 

1. Sun Workshop 4.2 C++ Compiler - debug symbol format not understood by debuggers

The Sun Workshop C++ Compiler (4.2) seems to generate object files
with debug symbols that are not understood by some debuggers,
namely GDB (even the latest 4.16 version for Solaris) and older
DBXs. I don't have the latest DBX debugger, it's quite expensive.
The UPS debugger seems to understand the debug symbols,
but it doesn't handle C++ templates properly.

Has anybody else also encountered this problem ?

Is there some way (eg. compiler/linker flag etc. to generate old
format etc.) in order to  use GDB to properly debug C++ programs
compiled with the Sun Workshop C++ Compiler ? I've tried numerous
flag settings, nothing fixes the problem. Anybody know of a
debugger other than those mentioned that will work for me ?

Any help appreciated.

Greg Nancarrow

2. 3-Button Mouse, FINALLY :)

3. Sun Workshop C/C++ Debugging Formats

4. problems using ramdisk - help needed.

5. Are sun studio C/C++ compilers and Forte C/C++ compilers same ??

6. first scsi drive has x86, second has win95, now to boot win95?

7. C++ templates w/ Sun C++ 4.1 on Solaris 2.4

8. 3Com 509 won't go (detailed!)

9. Sun forte C++ 5.1 vs C++ 4.2

10. >>PW:C/C++ UNIX ANALYST/PROGRAMMER: Unix, Sun, Solaris 2.x, C/C++

11. Cannot debug X progs - no libX11.a!!

12. debugging a prog that uses stdin

13. C++, SETENV to read outside prog.