hi, I have some code using __builtin_frame_address(0) to get
the current stack pointer in a 'portable' way.

Unfortunately, this appears not to work if -fomit-frame-pointer
is used on an x86. My system sets that automatically, since
the x86 is a bit short on registers and this is reputed
to help with optimisation.

This leaves one having to do processor dependent register
hackery to find the stack pointer. [I need a stack pointer
approximation to find roots for a garbage collector]

Is there another way? If not, I think to submit a bug report
with 'feature request' status, to have a way to get the stack
pointer that works even if -fomit-frame-pointer is specified.
Any comments? Is it a reasonable request?

BTW: what happens on ia64 which has two? stacks?

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

Reply via email to