[LLVMdev] Transition C->bitcode->assembly->object looses frame pointers

Alexander Potapenko ramosian.glider at gmail.com
Tue Apr 5 08:18:54 PDT 2011


Hi Duncan,

I really had to look into backtrace internals before asking.
Thank you very much!

Alexander

On Tue, Apr 5, 2011 at 6:24 PM, Duncan Sands
<duncan.sands at math.u-psud.fr> wrote:
> Hi Alexander, I took a look at how backtrace works and it doesn't use
> the frame pointer at all, instead it uses dwarf unwind tables.  So to
> make it work using llc you need to do as follows:
>
> $ llc -unwind-tables bt.ll -o bt.S
> $ gcc -o bt-llc bt.S
> $ ./bt-llc 4
> backtrace() returned 4 addresses
> ./bt-llc() [0x4007aa]
> ./bt-llc() [0x400856]
> ./bt-llc() [0x40087c]
> ./bt-llc() [0x400875]
>
> Ciao, Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list