[comp.unix.xenix] bugs in sdb ?

root@raider.MFEE.TN.US (Bob Reineri) (08/07/89)

Has anyone out there had any experience with sdb ? I can't seem to get most
of the commands to work as displayed in the tutorial (C Users Guide manual).

I compiled and linked the program with the -g option. I then ran it, like:

                          sdb prognam - /source/directory

It came up fine. But the program seems to choke on *many* of the things
the tutorial demonstrates. For example:

Command   Supposed To                                 What it does
-------   -------------------------------------       --------------------
@ax       Display a single register value.             symbol not found.
*/        Display all vars in current function.        error ? 
*:*/      Display all vars for all calls on stack      error ?

This is a small sampling. Among the other major annoyances I encounter are
the fact that it *never* recognizes pointers. I can't get it to do anything
with a pointer value but print 'symbol not found'. Yet if I issue a 'w'
command, I'm sitting there looking at it in the source code. 

Am I doing something wrong here ? This *is* the first time I've ever used
it - but all I'm trying to do is follow the tutorial. I'm almost certain
that I did everything correctly.

The command just doesn't seem to work as documented. Can someone confirm
this, or tell me what I may be doing wrong ? The OS is Xenix Sys V 3.2.1,
and the machine has the latest development system update installed. It's
running on a Tandy 4000.

Thanks for any help. Please email if possible.

Bob
-- 
* RaiderNet Public Access    *Middle Tenn's Unix Gateway*   Murfreesboro, TN *
* Data:(615)896-8716 896-7905 Voice:(615)684-4490 Mail:PO Box 2371 Zip 37133 *
* Domain: root@raider.MFEE.TN.US UUCP: {ames,decwrl,mit-eddie}!killer!raider *

fyl@ssc.UUCP (Phil Hughes) (08/16/89)

Sounds like you are doing nothing wrong.  Each new release of sdb
has a couple more commands that work.  Maybe someday more than
half will. :-)

My favorite is single step 10 instructions:
s10
symbol not found

-- 
Phil Hughes, SSC, Inc. P.O. Box 55549, Seattle, WA 98155  (206)FOR-UNIX
    amc-gw!ssc!fyl or uunet!pilchuck!ssc!fyl or attmail!ssc!fyl

jfh@rpp386.Dallas.TX.US (John F. Haugh II) (08/16/89)

In article <142@ssc.UUCP> fyl@ssc.UUCP (Phil Hughes) writes:
>Sounds like you are doing nothing wrong.  Each new release of sdb
>has a couple more commands that work.  Maybe someday more than
>half will. :-)
>
>My favorite is single step 10 instructions:
>s10
>symbol not found

And well it shouldn't!

s10 is a valid C symbol.  As such, the line 's10' indicates to
sdb it is to print the value of the symbol 's10' in its proper
format.

Try adding a space.  Perhaps the other half of the commands
would work if you inserted a few spaces ;-)  They are free,
you know!
-- 
John F. Haugh II                        +-Quote of the month club: ------------
VoiceNet: (512) 832-8832   Data: -8835  | "Chocolate Teddy Grahams are just
InterNet: jfh@rpp386.cactus.org         |  reincarnated Space Food Sticks."
UUCPNet:  {texbell|bigtex}!rpp386!jfh   +------------     -- Richard Sexton ---

karl@ddsw1.MCS.COM (Karl Denninger) (08/17/89)

In article <16899@rpp386.Dallas.TX.US> jfh@rpp386.cactus.org (John F. Haugh II) writes:
>In article <142@ssc.UUCP> fyl@ssc.UUCP (Phil Hughes) writes:
>>Sounds like you are doing nothing wrong.  Each new release of sdb
>>has a couple more commands that work.  Maybe someday more than
>>half will. :-)
>>
>>My favorite is single step 10 instructions:
>>s10
>>symbol not found
>
>And well it shouldn't!
>
>s10 is a valid C symbol.  As such, the line 's10' indicates to
>sdb it is to print the value of the symbol 's10' in its proper
>format.
>
>Try adding a space.  Perhaps the other half of the commands
>would work if you inserted a few spaces ;-)  They are free,
>you know!

Ok, how about this:

sdb akcs
*e read.c 		(Open one of the modules)
*101b			(stop here...)
*r
.........(execute the read command, etc.)
Breakpoint at .......
*confs[2].priv/		(This is a valid structure array, member, and request!)
Symbol not found
*

It doesn't work.  The correct results are, however, given by the 3b2 and 3b1 
sdb debuggers, as well as most others I have worked with (even Microport got
this one right!)  If I name the FIRST member in the structure, it DOES work.
Only second and subsequent member names fail.  This, of course, makes it
somewhat difficult to look at the rest of the structure.

If you're trying to debug a '286 program using sdb on a 386, you may as well
forget it.  That generally is as useful as using adb, as it can't even find 
externally-declared variables in large model programs!

Sdb on SCO Xenix is still useful, but it is definately brain-dead.

--
Karl Denninger (karl@ddsw1.MCS.COM, <well-connected>!ddsw1!karl)
Public Access Data Line: [+1 312 566-8911], Voice: [+1 312 566-8910]
Macro Computer Solutions, Inc.		"Quality Solutions at a Fair Price"