home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!ukma!darwin.sura.net!sgiblab!sgigate!sgi!quasar.mti.sgi.com!davea
- From: davea@quasar.mti.sgi.com (David B.Anderson)
- Subject: Re: dbx question.
- Message-ID: <selges4@sgi.sgi.com>
- Sender: davea@quasar.mti.sgi.com
- Organization: Silicon Graphics, Inc. Mountain View, CA
- Date: Mon, 16 Nov 1992 18:17:00 GMT
- Lines: 42
-
- In article <BxtKHF.4wK@news.cso.uiuc.edu> dsong@ncsa.uiuc.edu (Deyang Song) writes:
- >
- >
- >I came across a problem with dbx that I think may be a bug. The
- >problem is that dbx does not handle nested blocks properly. I have
- >a simple C test program below:
- >
- > 1 #include <stdio.h>
- > 2
- > 3 main()
- > 4 {
- > 5 int p=2;
- > 6
- > 7 {
- > 8 int p=4;
- > 9
- > 10 printf("\tp=%d\n", p);
- > 11 }
- > 12
- > 13 printf("p=%d\n",p);
- > 14 }
- >
- >I compiled it with -g and loaded it into dbx. When I stepped to
- >line 13, the visible p is still the one in the inner block. Can
- >someone tell me if it's a bug or there's an explanation for it?
-
- It's a bug. I believe that Workshop/Codevision handles this correctly.
- Only dbx gets it wrong.
-
- The problem is that while dbx notices the beginnings of block scopes
- and the end of functions, dbx does not notice the end of inner-block
- scopes.
-
- The scope data exists in the a.out. dbx has no excuse. dbx has been
- this way a long time.
-
- I hope get it fixed for the next major release (but the work is not done
- and I cannot promise....)
- [ David B. Anderson (415)390-4263 davea@sgi.com ]
-
-
-
-