Hi, using --unwind-tables should also do the trick. It is more lightweight than -g if you just need the unwind information.
Br, Zoltan On Tue, Oct 23, 2012 at 11:42 AM, Harald Servat <[email protected]> wrote: > Hello, > > El dt 23 de 10 de 2012 a les 12:33 +0300, en/na Tommi Rantala va > escriure: >> 2012/10/23 Harald Servat <[email protected]>: >> > Hello, >> > >> > I'm using libunwind 1.1 in a Linux with ARM processor. I've found that >> > unw_step seems not to work, or at least not as in x86-64 because it does >> > not report all the backtrace but only the top of the stack level. I'm >> > attaching a simple program (derived from the tests Gtest-bt.c) that >> > shows this and also the output in a ARM and in a X86/64 machine. >> > >> > Do I need to compile something in a special way? I've looked at the >> > objdump -D output from the ARM version and the subroutines seem to be >> > there. >> >> Greetings, >> >> Here are some debugging hints: >> - Try compiling your program with "-g", so that the binary will also >> carry the dwarf debugging information that is used for backtracing. >> - Try compiling your program with "-funwind-tables", to get ARM unwind >> tables that can be alternatively used for backtracing. >> - There's also a third backtracing alternative on ARM, the frame chain >> following. You'll need to compile with ARM & APCS modes for it to >> work. >> - To see what's happening inside libunwind, configure it with >> "--enable-debug", then "export UNW_DEBUG_LEVEL=99" before running your >> program. >> - On ARM, you can runtime select which unwind method(s) to use via >> environment variable UNW_ARM_UNWIND_METHOD, valid choices from >> include/tdep-arm/libunwind_i.h (by default, libunwind tries them all): >> >> #define UNW_ARM_METHOD_ALL 0xFF >> #define UNW_ARM_METHOD_DWARF 0x01 >> #define UNW_ARM_METHOD_FRAME 0x02 >> #define UNW_ARM_METHOD_EXIDX 0x04 > > Adding the -g did the trick. Now the sample works fine! > > I used it to exemplify an issue I'm having with a largest application > we're building. I'll rebuild this large application with -g and see if > it works. > > Thank you Tommi! > >> >> Regards, >> Tommi Rantala > > > > WARNING / LEGAL TEXT: This message is intended only for the use of the > individual or entity to which it is addressed and may contain > information which is privileged, confidential, proprietary, or exempt > from disclosure under applicable law. If you are not the intended > recipient or the person responsible for delivering the message to the > intended recipient, you are strictly prohibited from disclosing, > distributing, copying, or in any way using this message. If you have > received this communication in error, please notify the sender and > destroy and delete any copies you may have received. > > http://www.bsc.es/disclaimer > > _______________________________________________ > Libunwind-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/libunwind-devel _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
