home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sgi / 16485 < prev    next >
Encoding:
Text File  |  1992-11-16  |  1.4 KB  |  46 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!dsong
  3. From: dsong@ncsa.uiuc.edu (Deyang Song)
  4. Subject: dbx question.
  5. Message-ID: <BxtKHF.4wK@news.cso.uiuc.edu>
  6. Originator: dsong@merlin.ncsa.uiuc.edu
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: Nat'l Ctr for Supercomp App (NCSA) @ University of Illinois
  9. Date: Mon, 16 Nov 1992 17:27:11 GMT
  10. Keywords: dbx
  11. Lines: 33
  12.  
  13.  
  14.  
  15. I came across a problem with dbx that I think may be a bug. The
  16. problem is that dbx does not handle nested blocks properly. I have
  17. a simple C test program below:
  18.  
  19.      1  #include <stdio.h>
  20.      2
  21.      3  main()
  22.      4  {
  23.      5     int p=2;
  24.      6
  25.      7     {
  26.      8        int p=4;
  27.      9
  28.     10        printf("\tp=%d\n", p);
  29.     11     }
  30.     12
  31.     13     printf("p=%d\n",p);
  32.     14  }
  33.  
  34. I compiled it with -g and loaded it into dbx. When I stepped to
  35. line 13, the visible p is still the one in the inner block. Can
  36. someone tell me if it's a bug or there's an explanation for it?
  37. The dbx I'm using is version 2.10.
  38.  
  39.  
  40. Chris Song                                      UUCP: uiucuxc!newton!dsong
  41. National Center for Supercomputing Applications INTERNET:dsong@ncsa.uiuc.edu
  42. 605 E. Springfield Ave., Rm 152                 FAX:  (217) 244-2909
  43. Champaign, IL 61820                             PHONE:(217) 244-1981
  44.  
  45.  
  46.