[comp.sources.d] Program runs under sdb, but when called direct?!?!

megabyte@chinet.UUCP (Dr. Megabyte) (01/15/87)

I have a program, the recent VC spreadsheet program on my 
AT&T 3b2/400 with SVR2.  I compiled it without errors.  When I
try to run it, the program does nothing, so I treid to use
the sdb debugger on it.  When I used "sdb vc" and then issued
the "r" command to run the program, it ran fine!!
 
What could make a program run perfectly under the debugger, but
not from the shell?
-- 
UUCP:	(1) seismo!why_not!scsnet!sunder		Mark E. Sunderlin
	(2) ihnp4!chinet!megabyte			aka Dr. Megabyte
CIS:	74026,3235					(202) 634-2529
Mail:	IRS  PM:PFR:D:NO  1111 Constitution Ave. NW  Washington,DC 20224  

guy@enmasse.UUCP (The Computer Guy) (01/16/87)

In article <1024@chinet.UUCP> megabyte@chinet.UUCP (Dr. Megabyte) writes:
        I have a program, the recent VC spreadsheet program on my 
        AT&T 3b2/400 with SVR2.  I compiled it without errors.  When I
        try to run it, the program does nothing, so I treid to use
        the sdb debugger on it.  When I used "sdb vc" and then issued
        the "r" command to run the program, it ran fine!!
 
        What could make a program run perfectly under the debugger, but
        not from the shell?

I had the very same problem once.  It turned out that my PATH 
environment variable did not search the current directory first, so 
the shell was actually executing a program in another directory, while 
sdb (using the program name as a pathname) executed the one in the
current directory.  Don't you hate stupid problems like this?  
-- 
                                           -- guy k hillyer
               {alliant,panda,drilex}!enmasse!guy

mark@cogent.UUCP (01/17/87)

In article <1024@chinet.UUCP> megabyte@chinet.UUCP (Dr. Megabyte) writes:
>I have a program, the recent VC spreadsheet program on my 
>AT&T 3b2/400 with SVR2.  I compiled it without errors.  When I
>try to run it, the program does nothing, so I treid to use
>the sdb debugger on it.  When I used "sdb vc" and then issued
>the "r" command to run the program, it ran fine!!

When I try to run vc on my HP 840 running HP-UX (port of SVR2),
vc works until I try to enter a number.  It dies with a memory
fault upon the RETURN key.
-- 
+----------------------------------------------------------------------------+
|     Mark Steven Jeghers         ECHOMPGULP - process has eaten it          |
| cryptography, terrorist, DES, drugs, cipher, secret, decode, NSA, CIA, NRO |
|                                                                            |
|     {ihnp4,cbosgd,lll-lcc,lll-crg}|{dual,ptsfa}!cogent!mark                |
|                                                                            |
| Cogent Software Solutions can not be held responsible for anything said    |
| by the above person since they have no control over him in the first place |
+----------------------------------------------------------------------------+

mark@markshome.UUCP (01/18/87)

In article <140@cogent.UUCP> mark@cogent.UUCP (Mark Steven Jeghers) writes:
>In article <1024@chinet.UUCP> megabyte@chinet.UUCP (Dr. Megabyte) writes:
>>I have a program, the recent VC spreadsheet program on my 
>>AT&T 3b2/400 with SVR2.
>
>When I try to run vc on my HP 840 running HP-UX (port of SVR2),
>vc works until I try to enter a number.  

The vc I posted a couple years ago was very System V incompatible.  I
have been updating it over the months, including lots of new
functions and merging of mail people have sent me with bug fixes
and portability changes for 16 bitters and System Vr2 (or whatever an 
AT&T Unix PC uses).

Now that another vc, based on my old one, has appeared, I want to
merge the two versions before posting again.  Watch for yet another
'vc' (though possibly not called that) here soon.
-mark
Spoken: Mark Weiser 	ARPA:	mark@maryland	Phone: +1-301-454-7817
CSNet:	mark@umcp-cs 	UUCP:	{seismo,allegra}!umcp-cs!mark
USPS: Computer Science Dept., University of Maryland, College Park, MD 20742