[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libunwind] How does libunwind find the PFS, the return address and
From: |
David Mosberger |
Subject: |
Re: [libunwind] How does libunwind find the PFS, the return address and the alloc instruction? |
Date: |
Mon, 8 Dec 2003 15:39:37 -0800 |
>>>>> On Mon, 08 Dec 2003 10:46:12 +0100, Johan Walles <address@hidden> said:
Johan> When unwinding the stack on IA64, how does libunwind find the
Johan> alloc instruction, the register in which the PFS is stored,
Johan> and the register in which the return address is stored?
Based on the later mail, I think this part has been answered already.
The answer lies in the unwind info (whether static or dynamic).
Johan> More specifically, regarding the dynamic unwinding, do I need
Johan> to tell libunwind about these things, or does it figure them
Johan> out by itself (by disassembling the function)?
It definitely does NOT disassemble the function. Unwinding needs to
work reliably and code-reading can't really be reliable (unless you
place unreasonable restrictions on compilers/code-generators). Also,
some code may be mapped with EXECUTE-ONLY privilege, so disassembling
may not even be possible (true for the Linux kernel's gate page, for
example).
--david