[comp.unix.questions] Who uses 'adb' debugger?

toppin@melpar.UUCP (Doug Toppin X2075) (01/07/90)

I am interested in how many people use the 'adb' debugger
and any comments that they have on it (helpful hints,
useful scripts, complaints, bug reports). If you use
it and have some comment on it please drop me a line or
post. I have been using it a lot lately and am pretty impressed
with its abilities. I noticed that there is not much posted
about it nor is there a newsgroup dedicated to it.

thanks
Doug Toppin
uunet!melpar!toppin

jim@aob.aob.mn.org (Jim Anderson) (01/07/90)

In article <107@melpar.UUCP> toppin@melpar.UUCP (Doug Toppin   X2075) writes:
>I am interested in how many people use the 'adb' debugger
>...
The occasions I use adb depend on the circumstances.  On systems that have
it available, I use dbx.  On other systems, I use cdb.  On other systems,
I use adb.  If I have the core file and the executable file that created
it (and a symbol table exists in the executable), I can find out why a
program core dumped, and I can make changes to a program to prevent that
case and possibly others, from doing so.  The other advantage of adb is
that it exists on many machines, so if I provide a symbol table, I can
determine the cause of a core dump over the phone.
-- 
Jim Anderson			(612) 636-2869
Anderson O'Brien, Inc		New mail:jim@aob.mn.org
2575 N. Fairview Ave.		Old mail:{rutgers,amdahl}!bungia!aob!jim
St. Paul, MN  55113		Lucifer designed MS-DOS to try men's souls.

Jim Anderson			(612) 636-2869
Anderson O'Brien, Inc		New mail:jim@aob.mn.org
2575 N. Fairview Ave.		Old mail:{rutgers,amdahl}!bungia!aob!jim
St. Paul, MN  55113		Lucifer designed MS-DOS to try men's souls.

aryeh@eddie.mit.edu (Aryeh M. Weiss) (01/08/90)

>In article <107@melpar.UUCP> toppin@melpar.UUCP (Doug Toppin   X2075) writes:
>>I am interested in how many people use the 'adb' debugger

I use adb frequently because I have used it alot and it gives me information
that sdb does not.  One irritation I have is that when tracing a process,
I am interested in seeing what routines call which, so at a certain breakpoint
I must repeatedly enter a series of keystrokes to show the call stack and 
continue on.  What I would like to see in a debugger would be a general
breakpoint macro that will execute a list of commands when a breakpoint
occurs.  Another nice feature would be to a general mechanism to show when 
procedures are entered and exited within a certain procedure or range of
addresses without setting explicit breakpoints.  

What other debuggers are available (at low cost of course :-) for Xenix anyway?

-- 
eliot%lees-rif@eddie.mit.edu (Eliot H. Frank)

clement@buengf.bu.edu (Clement Lee) (01/08/90)

Sorry to ask the following, but I need to know the differences
between (I am a beginner on Unix and C):

  + adb
  + cdb
  + sdb
  + gdb (if you have it;  from GNU)

Can anyone tell me or make a list about their uses and their
differences?

Thanks in advance.

- Clement.

--
Internet, CSNET:  clement%buengf.bu.edu@bu-cs.bu.edu
UUCP:  ...!{harvard,mit-eddie}!bu-cs!buengf.bu.edu!clement

gwyn@smoke.BRL.MIL (Doug Gwyn) (01/09/90)

In article <1990Jan7.195850.26785@eddie.mit.edu> eliot@lees-rif.mit.edu (Eliot Frank) writes:
-One irritation I have is that when tracing a process,
-I am interested in seeing what routines call which, so at a certain breakpoint
-I must repeatedly enter a series of keystrokes to show the call stack and 
-continue on.  What I would like to see in a debugger would be a general
-breakpoint macro that will execute a list of commands when a breakpoint
-occurs.

Genuine "adb" does support this.

satam@ecs.umass.edu (Kirtikumar Satam) (01/10/90)

In article <50200@bu.edu.bu.edu>, clement@buengf.bu.edu (Clement Lee) writes:
> Sorry to ask the following, but I need to know the differences
> between (I am a beginner on Unix and C):
> 
>   + adb
>   + cdb
>   + sdb
>   + gdb (if you have it;  from GNU)
> 
> Can anyone tell me or make a list about their uses and their
> differences?
> 
> Thanks in advance.
> 
> - Clement.
> 
> --
> Internet, CSNET:  clement%buengf.bu.edu@bu-cs.bu.edu
> UUCP:  ...!{harvard,mit-eddie}!bu-cs!buengf.bu.edu!clement

I can't claim myself to be an expert but working for while on SCO XENIX 2.3
and ULTRIX, I think I can contribute a little.

On Xenix both adb and sdb are available. adb doesn't allow working with
source code. As I was totally ignorant about 80386 assembly, I found
sdb, the source-level debugger, much more useful. Espacially, while
printing out big structures, unions and lotsa pointers. It had a 
very good steping and break-pointing, but watch-points and trace functions
were extremely slow and use to nearly bring down the system.
The 'dbx' on ULTRIX is also a good debugger, but lacks the sophistication
of 'sdb' on SCO. It's really pain to get structures and union value
dumps. "gdb", I suppose is just an enhancement on 'dbx' and thus, carries
some of the short-comings of it.

I would also like to know about 'cdb' etc and how these debuggers fare
in contrast to PC debuggers like codeview and turbo debugger.

-satam (~guru).

------------------------------------------------------------------------
Kirtikumar "Mumbaichaa" Satam
INTERNET : satam@ecs.umass.edu
BITNET : satam@umaecs.bitnet
217 Northwood Apts, Sunderland, MA 01375   Tel# 413-665-3222
------------------------------------------------------------------------

clement@buengf.bu.edu (Clement Lee) (01/11/90)

It seems that cdb is a "not so popular" C debugger, and not many
people know about it.  Okay, then after I have gone to check it out, I
found out that it says "Copyright 1984 Third Eye Software, Inc." and
the version number is 19040 (I am running UMAX 4.2, same as 4.2 BSD,
on an Encore Multimax machine).  Also, in the on-line help, there is a
subset of commands which says dbx subset.  (dbx was mentioned by
Kirtikumar Satam, satam@ecs.umass.edu, in previous article.)

My friend in CS told me that gdb (GNU) and cdb are better than sdb or
adb, and gdb is the best, but to run gdb, the C program has to be
compiled by gcc.  But I still have no idea of what is better.

If anyone has any experience and opinion to share, please do so. And
thanks for those previous replies.

Also, gdb and cdb "man" pages can be sent upon request.

- Clement.

--
Internet, CSNET:  clement%buengf.bu.edu@bu-cs.bu.edu
UUCP:  ...!{harvard,mit-eddie}!bu-cs!buengf.bu.edu!clement

meissner@osf.org (Michael Meissner) (01/12/90)

In article <50349@bu.edu.bu.edu> clement@buengf.bu.edu (Clement Lee) writes:

| My friend in CS told me that gdb (GNU) and cdb are better than sdb or
| adb, and gdb is the best, but to run gdb, the C program has to be
| compiled by gcc.  But I still have no idea of what is better.

Gdb blows the socks off sdb and dbx.  You should be able to use the
standard C compiler on your system, since gdb will grok either the
.stab information (what dbx usually uses) or the COFF debug
information (what sdb usually uses) depending on what the system
supports.  Note, you should get the latest version of GDB (3.4) rather
than old musty, broken gdb that is currently on the emacs tape (2.x).
You can get GDB from the Free Software Foundation (it's on their
compiler tape), or via anonymous ftp from prep.ai.mit.edu, or
uunet.uu.net, or via anonymous uucp from ohio state.

A popular way of using GDB is to use it through GNU emacs (M-x gdb).
You get put into two window mode on breakpoints, one window being the
current gdb interaction layer, and the other being the source file,
with the line the breakpoint is on indicated.  I discovered that this
does have it's drawbacks if you are debugging large programs, since
emacs, gdb, and the program must be running simulataneously.
--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA

Catproof is an oxymoron, Childproof is nearly so

satam@ecs.umass.edu (Kirtikumar Satam, ECE, UMASS Amherst) (01/12/90)

In article <50349@bu.edu.bu.edu>, clement@buengf.bu.edu (Clement Lee) writes:
> It seems that cdb is a "not so popular" C debugger, and not many
> people know about it.  Okay, then after I have gone to check it out, I
> found out that it says "Copyright 1984 Third Eye Software, Inc." and
> the version number is 19040 (I am running UMAX 4.2, same as 4.2 BSD,
> on an Encore Multimax machine).  Also, in the on-line help, there is a
> subset of commands which says dbx subset.  (dbx was mentioned by
> Kirtikumar Satam, satam@ecs.umass.edu, in previous article.)
> 
> My friend in CS told me that gdb (GNU) and cdb are better than sdb or
> adb, and gdb is the best, but to run gdb, the C program has to be
> compiled by gcc.  But I still have no idea of what is better.
> 
> If anyone has any experience and opinion to share, please do so. And
> thanks for those previous replies.
> 
Another point of confusion is what is exactly provided by these debuggers.
'sdb' on SCO XENIX may have an altogether different functionality than
that on other system. e.g. 'adb' on ultrix says that it is C program
debugger, while the same on SCO XENIX 2.2/2.3 was purely for assembly.

One of the replies that I got says that 'dbx' on SUN OS has more facilities
than that on ULTRIX. Now, which 'dbx' then to be used for comparison?

In short, the best way to compare debuggers is, I suppose, to first
find out what is supported on one's system and then compare them
by the functionality rather than by name.

-satam
------------------------------------------------------------------------
Kirtikumar "Mumbaichaa" Satam
INTERNET : satam@ecs.umass.edu
BITNET : satam@umaecs.bitnet
217 Northwood Apts, Sunderland, MA 01375   Tel# 413-665-3222
------------------------------------------------------------------------

rkeller@matrox.com (Robert Keller) (01/12/90)

In article <50349@bu.edu.bu.edu> clement%buengf.bu.edu@bu-cs.bu.edu (Clement Lee) writes:
>...to run gdb, the C program has to be compiled by gcc. 
>- Clement.

This is false, gdb only requires that the source be compiled with the -g option.

...robert keller      (a long time user of gdb under Sys V/386 and SunOs)

clement@buengf.bu.edu (Clement Lee) (01/12/90)

After I have done a little work, I found out that (based on my machine):

   adb - is an assembly language debugger, and can also debug binary
         files.

   sdb - is a symbolic debugger for C, Fortran-77.

   gdb - is a source level symbolic debugger for C, and has something
         of the flavor of dbx, but has more features and power.
         (Since I've never used dbx, I can't compare gdb w/ dbx.)

   cdb - is a debugger for C, Fortran, and assembly programs, and the
         two main differences between cdb and other debuggers are:

            + cdb can attach to an existing process.

            + cdb can be used to debug multiple processes as will as
              a single process.

So, that is it all.

And again, thanks for all previous advice.

- Clement.

--
Internet, CSNET:  clement@buengf.bu.edu (clement%buengf.bu.edu@bu-cs.bu.edu)
UUCP:  ...!{harvard,mit-eddie}!bu-cs!buengf.bu.edu!clement

peter@thirdi.UUCP (Peter Rowell) (01/13/90)

In article <50349@bu.edu.bu.edu> clement%buengf.bu.edu@bu-cs.bu.edu (Clement Lee) writes:
>It seems that cdb is a "not so popular" C debugger, and not many
>people know about it.

Perhaps "not so well known" might be more accurate (:-) - cdb seems to
be quite popular with our customers.  They like really radical features
like (a) it doesn't lie to them about the true value of bit fields (or
register values saved on the stack frame, etc.) and (b) that cdb does
not use "Segmentation violation" as its way of indicating incorrect
input.

> Okay, then after I have gone to check it out, I
>found out that it says "Copyright 1984 Third Eye Software, Inc." and
>the version number is 19040 (I am running UMAX 4.2, same as 4.2 BSD,
>on an Encore Multimax machine).

Cdb runs on a wide range of architectures (including 680x0, 32x32,
Pyramid, SPARC, 80386, CCI Tahoe, Vax, 29000, and 3B2) under a truly
bizzare list of "UNIX" systems.

>My friend in CS told me that gdb (GNU) and cdb are better than sdb or adb,

True.

>and gdb is the best, but to run gdb, the C program has to be
>compiled by gcc.  But I still have no idea of what is better.

I would argue that cdb *might* be better than gdb, but then I'm
prejudiced.  I am almost certain gdb will work with compilers other
than gcc.

>Also, gdb and cdb "man" pages can be sent upon request.

(Minor plug follows)

Complete cdb information may also be obtained from:

	Diane Butler
	Third Eye Software, Inc.
	535 Middlefield Road, Suite 170
	Menlo Park, CA  94025
	(415) 321-0967
	diane@thirdi.UUCP
	...!{apple,pyramid,sun}!thirdi!diane

----------------------------------------------------------------------
Peter Rowell				peter@thirdi.UUCP
Third Eye Software, Inc.		(415) 321-0967
Menlo Park, CA  94025

gwyn@smoke.BRL.MIL (Doug Gwyn) (01/13/90)

In article <50349@bu.edu.bu.edu> clement%buengf.bu.edu@bu-cs.bu.edu (Clement Lee) writes:
>My friend in CS told me that gdb (GNU) and cdb are better than sdb or
>adb, and gdb is the best, but to run gdb, the C program has to be
>compiled by gcc.  But I still have no idea of what is better.

You don't normally have much choice on a given system.
Anyway, this tends to be a "religious" issue like the one about
which text editor is best.
"pi" is better than all the ones you mention, but you're unlikely
to have it available.  (There is a version available for use with
downloaded DMD or MTG processes.)
SGI provides "edge" on the 4D Irix systems.  It's comparable to
the source-level debuggers you find in PC environments.
I often resort to "adb" when it's available, primarily in order to
avoid complications when getting at the real machine code.

barnett@crdgw1.crd.ge.com (Bruce Barnett) (01/13/90)

In article <MEISSNER.90Jan11114550@pmax27.osf.org>, meissner@osf (Michael Meissner) writes:

>Gdb blows the socks off sdb and dbx.

I'll have to learn more about it. What does gdb have as features that
dbx doesn't, besides the emacs interface?

--
Bruce G. Barnett	<barnett@crd.ge.com>   uunet!crdgw1!barnett