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

Duncan Sands duncan.sands at math.u-psud.fr
Tue Apr 5 07:24:26 PDT 2011

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.

More information about the llvm-dev mailing list