[LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
ramosian.glider at gmail.com
Tue Apr 5 08:18:54 PDT 2011
I really had to look into backtrace internals before asking.
Thank you very much!
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
More information about the llvm-dev