[comp.lang.c++] Debugging C++ with dbx ...

peterli@ux5.lbl.gov (11/06/90)

As a follow-up to my previous article asking for cheap or free debuggers
for AT&T C++ 2.0 code, I decided to "hack" one up myself.

The solution is to use the demangling tools provided by AT&T C++ program 
suite to demangle just the symbol table of an executable program
compiled with "-g" flag. Afterwards, dbx will read the symbol table in
as a normal C program, but all the nasty mangled names has been 
"normalized".  (I told you it is a hack :-)

So far, it has been tested on:
1. Sun and VAX
2. 4.3 BSD, Ultrix, and SunOS 4.0+.
3. AT&T C++ 2.0

It does not yet support COFF format executables.
And you will need source code access to AT&T demangling tools,
or have someone provide them.

If anyone else is interested in testing or porting this set of programs,
send me mail to the address below and I will send you a copy (about 70K
of shar file).

Thanks,
Peter Li
email: peterli@mis.ucsf.edu

carroll@paul.rutgers.edu (V. I. Lenin) (11/08/90)

It appears that a C++ "a.out demangler" is one of those wheels that
gets reinvented over and over.  You might be interested in knowing
that such a tool already comes as part of the AT&T Standard Library
Extension product.  So far it works on:

1. Sun-3, Sun-4, Vax, 3B2, HP9000, Amdahl, 6386
2. SunOS 3+, SunOS 4+, SVR3, SVR4, HP-UX, and UTS.
3. AT&T C++ 2.0

As you can see, it understands COFF binaries.

So go buy the AT&T Standard Library Extension, and pay my salary today... :)

martin carroll
carroll@mozart.att.com