Info-3b2 Digest, Number 62

Info-3b2 Mailer info-3b2 at lamc.UUCP
Fri Feb 24 02:28:47 AEST 1989


 
                           Info-3b2 Digest, Number 62
 
                          Thursday, February 23rd 1989
 
Today's Topics:
 
                                debugger question
----------------------------------------------------------------------
 
Date: Wed, 22 Feb 89 17:26:43 est
From: Danny Quah <ames!heretic.MIT.EDU!ll-xn!dquah>
Subject: debugger question

[Hmm, he was right, this group is being awfully quiet..]

	This is puzzling. I enclose the simplest C program. Compile
and run it:  it correctly shows that jLook is first 1 and then -1.
Then try to execute the code under a debugger, stopping just before
the line that sets jLook to -1. Examine jLook before and after that
line. 

	On the 3b2/400 (SysV R3, fpcc, sdb), the "after" jLook gives
"data address not found", even though when you let the code complete
execution, the correct values are printed. On the RT/PC (AIX) (dbx),
the "after" value of jLook is 4294967295. Again letting the code run to
completion, the correct values are printed on stdout. _And_ on both
the Sun OS3.2 (dbx) and the 3b1 [3.51] (sdb), the debugger prints the
right value after jLook = -1.  

	Is this a well known problem? An "unsigned" problem? What
gives?

--snip here--
#include <stdio.h>

main()
{
  int  jLook ;

  jLook = 1 ; 
  (void)fprintf(stdout, "\njLook is: %d", jLook) ;

  jLook = -1 ;
  (void)fprintf(stdout, "\njLook is: %d", jLook) ;

}
--and  here--

--Danny (dquah at dolphin.mit.edu, dquah at athena.mit.edu)
Dept. of Economics MIT, E52-274b, Cambridge MA 02139. (617)253-0914
#

 
-------------------------------------
 
To join this group or have your thoughts in the next issue, please
send electronic mail to Ken Davis at the following address;
 
	{pacbell,netsys,hoptoad,well}!lamc!info-3b2-request
 
The views expressed in Info-3b2 Digest are those of the 
individual authors only.
 
*********************
End of Info-3b2 Digest
*********************



More information about the Comp.sys.att mailing list