[haiku-development] Re: Bug in KDL stack trace output (?)

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 02 Jun 2012 01:42:11 +0200

Julian Harnath wrote:
> Ingo Weinhold <ingo_weinhold@xxxxxx> schrieb:
> > I would simply call it a more frame-centric view. "Caller" ist the 
> > caller of
> > the frame, not the function that creates the frame. In the end it's 
> > just a 
> > matter of personal preference I guess.
> 
> I don't quite understand what you mean, could you explain a bit more?
> The issue I see is that the frame pointer it prints is not the one of 
> the function whose name it prints right next to it. The addresses (both, 
> frame pointer and return address) it prints are always those of the 
> function name one line below in the trace. In how far is that more 
> "frame-centric" or useful?

For x86 a stack frame consists of: (local variables, saved registers, etc.,) 
pointer to previous frame, return address, function parameters. What is printed 
now is the address of the frame, the return address (aka caller) it contains, 
and the name of the function that return address resolves to. I would call this 
is frame-centric in the way that we print information about the frame (i.e. the 
caller of the frame), not about the function (the frame it creates). I don't 
consider it any more or any less useful than a shifted presentation.

I'm rather unpassionate about changing the presentation. Neither do I see a 
strong reason to change it -- the only reason I see at all is that developers 
might expect it differently -- nor do I mind the change. However, if it is 
changed, it should be changed consistently for all architectures and the column 
heading "caller" should be adjusted, since it would no longer be correct.

CU, Ingo

Other related posts: