Further cache generating if PC is 0?

Jason Molenda jmolenda@apple.com
Thu Jun 23 21:28:00 GMT 2005


On Jun 23, 2005, at 2:13 PM, Mark Kettenis wrote:

>    cf http://sources.redhat.com/ml/gdb-patches/2005-06/msg00060.html
>
> Well, I still seem to remember that at one moment in time, around the
> time the i386 was converted to using the new frame unwinding code,
> there was a fairly common case on Linux systems where the assumption
> that there MUST be a frame didn't hold.

With my patch, if a function could be potentially frameless and we  
can't parse the prologue or we don't know where the function starts,  
I assume it's frameless.  If the function must have set up a frame, I  
assume it set up a frame using the standard save-the-caller's-ebp idiom.

It's entirely reasonable to argue that my assumptions are incorrect.   
But if -fomit-frame-pointer code exists on the stack, *no*  
assumptions are correct.  The current code isn't correct, my code  
isn't correct.  The only correct thing to do is abort the stack  
backtrace and insist that gdb can't continue.

> I hope to be looking into Jason's patch this weekend, but in any case,
> it'll need thorough testing on many systems and with different
> compilers.  Only looking at the latest Fedora Core defenitely will not
> do.

Thanks Mark -- no rush, I'm not going away or going to lose  
interest. :-)

As far as testing on other systems, it's working GREAT on MacOS X for  
Intel. :)

Jason



More information about the Gdb mailing list