[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] unw_step in ARM?

From: Harald Servat
Subject: Re: [Libunwind-devel] unw_step in ARM?
Date: Tue, 23 Oct 2012 11:42:28 +0200


El dt 23 de 10 de 2012 a les 12:33 +0300, en/na Tommi Rantala va
> 2012/10/23 Harald Servat <address@hidden>:
> > 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]