Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!tut.cis.ohio-state.edu!att!cbnewsc!fjo
From: fjo@cbnewsc.ATT.COM (frank.j.owen)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Problem with LSC 4.0 debugger.
Message-ID: <3425@cbnewsc.ATT.COM>
Date: 25 Sep 89 16:35:39 GMT
References: <2693@husc6.harvard.edu>
Distribution: na
Organization: AT&T Bell Laboratories
Lines: 46

From article <2693@husc6.harvard.edu>, by siegel@endor.harvard.edu (Rich Siegel)

> 
> (In advance, please excuse any rampant sarcasm. I'm having a tough time.)
> 
> It's quite clear that you didn't consider all of the issues before posting
> your article. For example:
> 
> 	The debugger is able to do its trace of the procedure call chain by
> examining return addresses, not by examining stack frames? Why? Simple: not
> all routines generate a LINK/UNLK pair; if a function has no arguments, no
> local variables, and no compiler-generated temps, then there will be
> no LINK/UNLK pair, and therefore there's no way to trace the call chain
> for that routine. Hence, the debugger traces return addresses instead of
> A6 frames.

Wait a minute! I'll grant you that if there is no stack frame, you must
just look at the return address, but if there IS a stack frame, isn't the
return address IN the stack frame? The debugger MUST be extracting the
return address from all the other things in the stack, so it must
know SOMETHING about the stack frames! 
 
> 
> 	Furthermore, it's currently impossible to find variables in frames
> other than the current activation. Why? Because if the variable is allocated
> in a register, it's been saved *somewhere* on the stack by a MOVEM 
> instruction.
> Currently, the compiler does not retain the information as to where the

 I think IF the compiler generated enough information, the debugger
SHOULD be able to match up all the stuff on the stack correctly.
It may be true that the CURRENT debugger can't do these things because
the CURRENT compiler doesn't give it enough information, but that is
no excuse. Change the compiler. 

   I think that the feature described in the original posting is a
useful and valid one. Other compiler/debuggers (I don't know of any in the Mac
arena - perhaps the Aztec sdb) have this feature. It IS doable. If 
there are "other issues to consider" that is your job. We just want
the feature. We don't really care what it takes.

-- 
Frank Owen   312-982-2182
AT&T Bell Laboratories 
5555 Touhy Ave., Skokie, IL  60077
PATH:  ...!att!ihc!fjo