[Top][All Lists]

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

[Libunwind-devel] unw_step in ARM?

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


  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

  In ARM:
  # gcc -O0 mytest-bt.c -I ../include
-L /gpfs/CEPBATOOLS/libunwind/1.1/lib -lunwind -lunwind-arm -o mytest-bt
  # LD_LIBRARY_PATH=/gpfs/CEPBATOOLS/libunwind/1.1/lib:
$LD_LIBRARY_PATH ./mytest-bt
bar (123)
foo (123)
        explicit backtrace:
0000000000008734 unw_get_proc_name: <do_backtrace+0x3c>
        handler=0x0 lsda=0x0 gp=0x0

  In X86/64:
  # gcc -O0 mytest-bt.c -I aplic/libunwind/1.1/include -L
aplic/libunwind/1.1/lib -lunwind -lunwind-x86_64 -o mytest-bt
  # LD_LIBRARY_PATH=aplic/libunwind/1.1/lib:$LD_LIBRARY_PATH ./mytest-bt
bar (123)
foo (123)
        explicit backtrace:
000000000040092a unw_get_proc_name: <do_backtrace+0x26>
        handler=0x0 lsda=0x0 gp=0x6011e0
0000000000400b30 unw_get_proc_name: <foo+0x2a>    (sp=00007ffff8c9b1c0)
        handler=0x0 lsda=0x0 gp=0x6011e0
0000000000400b63 unw_get_proc_name: <bar+0x31>    (sp=00007ffff8c9b1e0)
        handler=0x0 lsda=0x0 gp=0x6011e0
0000000000400b7e unw_get_proc_name: <main+0x19>   (sp=00007ffff8c9b200)
        handler=0x0 lsda=0x0 gp=0x6011e0
0000003c4342169d unw_get_proc_name: <__libc_start_main+0xed>
        handler=0x0 lsda=0x0 gp=0x3c437b0fe8
0000000000400849 unw_get_proc_name: <_start+0x29> (sp=00007ffff8c9b2e0)
        handler=0x0 lsda=0x0 gp=0x0


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.

Attachment: mytest-bt.c
Description: Text Data

reply via email to

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