Closed
Bug 331436
Opened 18 years ago
Closed 18 years ago
__builtin_frame_address(0) doesn't work anymore
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: dbaron)
Details
(Keywords: fixed1.8.1, Whiteboard: [patch])
Attachments
(1 file)
12.73 KB,
patch
|
brendan
:
review+
brendan
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 1•18 years ago
|
||
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.
Assignee | ||
Comment 2•18 years ago
|
||
I also threw in some changes to prefer void* over u_long for pointers.
Attachment #216054 -
Flags: review?(brendan)
Assignee | ||
Comment 3•18 years ago
|
||
Er, sorry, uint32. (Which actually means it *is* important for x86_64, although some of these don't yet completely work there.)
Assignee | ||
Updated•18 years ago
|
Whiteboard: [patch]
Comment 4•18 years ago
|
||
Comment on attachment 216054 [details] [diff] [review] patch Very quick r=me, more rs=me actually (jury duty break ending). /be
Attachment #216054 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 5•18 years ago
|
||
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Attachment #216054 -
Flags: approval-branch-1.8.1?(brendan)
Assignee | ||
Comment 6•18 years ago
|
||
(And I fixed the C++ comments to be C comments after landing on the trunk; need to do that on the branch too.)
Updated•18 years ago
|
Attachment #216054 -
Flags: approval-branch-1.8.1?(brendan) → approval-branch-1.8.1+
You need to log in
before you can comment on or make changes to this bug.
Description
•