[comp.lang.c++] Anybody use debuggers?

dld@theory.cs.cmu.edu (David Detlefs) (04/10/87)

I am just starting to use C++, and have run into a problem that I'm
sure others have encountered.  I'm loathe to retreat to debugging via
inserting print statements, so I'd like to use some debugger or
another, such as dbx or gdb (of course, a Lisp-like C++-specific
debugging environment would be best, but...).  Unfortunately, the
symbols all get weird names, with gratuitous underscores thrown in,
etc.  Could people give me some advice on any way to use reasonably
high-level tools to debug C++?

Dave

jules@zen.UUCP (Julian Perry) (04/25/87)

I've  found  that  the  number  of  bugs  in  my   software  is  reduced
significantly  when  using C++ due to its  stricter  type  checking  and
natural structure.

However,  I have  found  (not  being one to claim  that I write bug free
code)  that when I do resort to a source  debugger,  that the  change in
symbol  names is not too  confusing  and it doesn't  work out too bad in
practice.  We are  running a System V thing  called  HP-UX on an  HP9000
Series 500 with a debugger called cdb which is excellent.

If you  really get into  trouble  you can  always  debug the C  produced
rather than the C++, but I found that rarely necessary.

Jules [the one who wants adb and profile.opt for the hp9000s500]

-- 
IN-REAL-LIFE:  Julian Perry           
E-MAIL:        jules@zen.co.uk || ...!mcvax!ukc!zen.co.uk!jules
PHONE:         +44 532 489048 ext 217
ADDRESS:       Zengrange Limited, Greenfield Road, Leeds, England, LS9 8DB

mikem@otc.OZ (Mike Mowbray) (04/29/87)

In article <597@zen.UUCP>, jules@zen.UUCP (Julian Perry) says:

> I've  found  that  the  number  of  bugs  in  my   software  is  reduced
> significantly  when  using C++ due to its  stricter  type  checking  and
> natural structure.

Agreed.

> However,  I have  found  (not  being one to claim  that I write bug free
> code)  that when I do resort to a source  debugger,  that the  change in
> symbol  names is not too  confusing  and it doesn't  work out too bad in
> practice.
>
> If you  really get into  trouble  you can  always  debug the C  produced
> rather than the C++, but I found that rarely necessary.

I used to do this too, but I haven't found it necessary for months now.
Perhaps using C++ actually improves one's programming style, and
decomposition skill (?)

			Mike Mowbray
			Systems Development
			Overseas Telecommunications Commission (Australia)

UUCP:   {seismo,mcvax}!otc.oz!mikem              ACSnet: mikem@otc.oz