Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!hal!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery) Newsgroups: comp.sys.mac.programmer Subject: Re: Problem with LSC 4.0 debugger. Message-ID: <1989Sep29.032130.24399@NCoast.ORG> Date: 29 Sep 89 03:21:30 GMT References: <85031@pyramid.pyramid.com> <244@dbase.UUCP> <85347@pyramid.pyramid.com> <254@dbase.UUCP> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery) Followup-To: comp.sys.mac.programmer Distribution: na Organization: North Coast Public Access UN*X, Cleveland, OH Lines: 36 As quoted from <254@dbase.UUCP> by awd@dbase.UUCP (Alastair Dallas): +--------------- | to show me the value of variables which are in context. If the program can't | see a variable in a particular context, I don't expect that the debugger | can, either. +--------------- Alastair, have you ever used Unix sdb or dbx (depending on your Unix's race ;-) ? Both have this capability, and it is invaluable. It's just not that difficult to provide, assuming the compiler outputs enough debugging information in the symbol table or etc. * t foo(bar=1, baz=2) [bar.c:74] bar(baz=3) [main.c:12] * bar:x/ 12 * _ I do this all the time; if you need to know, for example, *why* foo() got the arguments it did (or got called at all), you need to be able to examine the state of the calling function. That information is present on the stack, and as long as your debugger can follow return addresses to find function stack frames and it can understand stack frames at all -- the first is basic to a debugger, the second requires information from the compiler as to what got put into the stack frame, possibly along with some peeking at the function preamble -- it can find and display, and even modify, these variables. Even register variables if the compiler is nice enough to state in the symbol table that bar:x was assigned to, say, D4. ++Brandon -- Brandon S. Allbery, moderator of comp.sources.misc allbery@NCoast.ORG uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu bsa@telotech.uucp, 161-7070 BALLBERY (MCI), ALLBERY (Delphi), B.ALLBERY (GEnie) Is that enough addresses for you? no? then: allbery@uunet.UU.NET (c.s.misc)