sdb: the debugger from hell...

Richard Todd rmtodd at servalan.uucp
Thu Dec 13 04:03:49 AEST 1990


brownrigg at kuhub.cc.ukans.edu writes:

>Where does sdb come from?  My first and only experience with it is with
>A/UX.  I've never seen it on any other Unix-box I've encountered (I'm not
>a Unix god, and have personally experienced only 4 vendors' implementations).

Lemme guess--most of the other Unix boxen you encountered were BSD machines,
right?  sdb was dreamed up by the fine folks at AT&T USG (though not exclusively
found on SysV machines; it also surfaces on BSD systems that use COFF-format
for their executables--there is at least one, believe it or not).  Yes, sdb
comes from the same crew that gave you the fixed-size tables in cc, make,
and damn near everything else on SysV (apparently under the belief that 
everyone still has PDP-11s with 64K max data space :-).  (Okay, enough USG 
flamage for now, you get the idea). 
  
>But if I may:  I'd suggest a more appropriate name would be "msdb" - 
>Marginal Symbolic DeBugger.  Its bad enough that the thing knows fairly 

Yep.  About the only good thing about sdb is that it is more clueful about
handling C structures et al than its predecessor adb.  (I haven't personally
seen all the misbehavior of sdb you report, but I'm willing to take your
word on it.)  However, there is relief courtesy of your friendly next-door
(literally) archive site, wuarchive.wustl.edu.  Lurking in the /systems/aux/
gnu directory are executables for GDB, the GNU Debugger.  It does know from
typecasts, groks *myPtr, has a conditional trap facility that'll blow your
mind, and I haven't yet seen it core dump, and it's got a whole lot more 
nice features, too.  Note that there are two versions of gdb on wuarchive;
the one starting with "sgdb-..."  is for programs compiled with cc; the one
starting with "gdb-..." is for programs compiled with gcc (or g++ -- gdb has
some support for C++ debugging).  

>1)  if I could garrantee valid contents of memory locations I wanted to 
>display, I sure wouldn't need a debugger...  2) since CTRL-D is overloaded
Heh.  No kidding...

>in the sense it displays the "next block of" either source text, OR memory
>locations, depending upon context, I'm constantly being nailed by intending
>to display the next 10 lines of code, after having displayed some memory
>contents, only to have the next <= 10 memory locations displayed and 
>invariably one of them "ain't kosher floating point". Ka-boom!  (doctor
  GDB has separate commands for displaying source files and displaying memory
locations.

>So what's the "community" have to say about my ramblings?

Don't fight, switch.  :-)
--
Richard Todd	rmtodd at uokmax.ecn.uoknor.edu  rmtodd at chinet.chi.il.us
	rmtodd at servalan.uucp
"Try looking in the Yellow Pages under 'Psychotics'." -- Michael Santana



More information about the Comp.unix.aux mailing list