Duncan Sands
2011-Apr-05 13:45 UTC
[LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
Hi Alexander, while I can reproduce the problem with your example, inspection of the assembler shows that the frame pointer is being correctly set up in each function. So I don't think the problem is due to frame pointer elimination. Ciao, Duncan.
Duncan Sands
2011-Apr-05 14:24 UTC
[LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
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.
Alexander Potapenko
2011-Apr-05 15:18 UTC
[LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
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 >
Seemingly Similar Threads
- [LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
- [LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
- [LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
- [LLVMdev] Transition C->bitcode->assembly->object looses frame pointers
- [LLVMdev] Transition C->bitcode->assembly->object looses frame pointers