[LLVMdev] Why do LLVM and GCC differ in the position of the frame pointer for ARM?

Renato Golin renato.golin at linaro.org
Thu Jan 16 03:41:15 PST 2014


On 16 January 2014 11:02, Keith Walker <kwalker at arm.com> wrote:

> This difference will make it difficult, without additional information, for
> a generic stack walker to use the frame pointer to walk up the stack that
> can handle both GCC and LLVM compiled code.
>

Hi Keith,

I've come across this problem when comparing GCC and LLVM generated code,
but I hadn't thought about the implications on a stack walker. I wouldn't
trust prologue code to tell me that, as you may not have it at all, or have
different functions compiled by different compilers in the same object, so
I get your point on the difficulty on producing an efficient walker.

I don't know what's the source of this preference in either LLVM or GCC,
but I'd have a look in what LLDB does, as it probably had the same problem
to solve.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140116/068ca50a/attachment.html>


More information about the llvm-dev mailing list