So, between the compilers on Fedora Core 4 and Fedora Core 5, __builtin_frame_address(0), which we started using extensively for our debugging tools in the patches to bug 323853, stopped working. Instead of pointing to the saved frame pointer on the stack, it points to the last of the saved registers on the stack, which varies by function. So I can work around it by throwing bp += 3 in DumpStackToFile and ++bp in jprof's equivalent, but that doesn't seem satisfactory. I could use inline assembler as in attachment 210815 [details] [diff] [review]. I'd also like to understand why this changed so I can know how to ifdef any fixes, if necessary.
Note that I'm compiling with -fno-omit-frame-pointer. There may have been some changes that require that for this stuff to work (i.e., stop using a register for the frame pointer by default); perhaps they're even related.
Created attachment 216054 [details] [diff] [review] patch I also threw in some changes to prefer void* over u_long for pointers.
Er, sorry, uint32. (Which actually means it *is* important for x86_64, although some of these don't yet completely work there.)
Comment on attachment 216054 [details] [diff] [review] patch Very quick r=me, more rs=me actually (jury duty break ending). /be
Checked in to trunk.
(And I fixed the C++ comments to be C comments after landing on the trunk; need to do that on the branch too.)
Checked in to MOZILLA_1_8_BRANCH.