Thanks for your reply. It works with -funwind-tables indeed!
I also try this in pi64[https://github.com/bamarni/pi64] which is based on Debian with GCC 6.3.0. I think this is a new version GCC, but it still need the -funwind-tables flag. Which OS and GCC version do you use? Thanks, Wu 2017-10-04 0:09 GMT+08:00 Dave Watson <davejwat...@fb.com>: > On 09/29/17 09:48 PM, Bingzheng Wu wrote: >> Hi all >> >> I use libunwind at aarch64, but unw_step() fails. >> >> Machine: Raspberry Pi 3B >> OS: SUSE Linux Enterprise Server >> [https://urldefense.proofpoint.com/v2/url?u=https-3A__www.suse.com_products_arm_raspberry-2Dpi_&d=DwICAg&c=5VD0RTtNlTh3ycd41b3MUw&r=vou6lT5jmE_fWQWZZgNrsMWu4RT87QAB9V07tPHlP5U&m=r0pyTsM85cT0L4vwRpatiU8zRUpyLyIBTJFvuTXPAwI&s=dS3FN1I_eYJcl-YDu1Zx1ID4ftvVuCDiH_o2yD6cIN8&e= >> ] >> Version of libunwind: 1.12.1 >> >> I just use the sample code in the man page >> [https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nongnu.org_libunwind_man_libunwind-283-29.html&d=DwICAg&c=5VD0RTtNlTh3ycd41b3MUw&r=vou6lT5jmE_fWQWZZgNrsMWu4RT87QAB9V07tPHlP5U&m=r0pyTsM85cT0L4vwRpatiU8zRUpyLyIBTJFvuTXPAwI&s=Su-y7JDyDrX9j4K8mIRdQ-nPxJKjML7dsTZIeGnyCQA&e= >> ] , but it fails >> with the debug output: >> >> ==== >> >_ULaarch64_init_local: (cursor=0xffffdd72d120) >> >_ULaarch64_step: (cursor=0xffffdd72d120, ip=0x0000000000400b8c, >> cfa=0x0000ffffdd72bf30)) >> >access_mem: mem[400b8c] -> 531f7800b9401fa0 >> >get_rs_cache: acquiring lock >> >_ULaarch64_dwarf_find_proc_info: looking for IP=0x400b8b >> >_ULaarch64_dwarf_callback: checking , base=0x0) >> >_ULaarch64_dwarf_callback: found table `': >> segbase=0x400ce4, len=2, gp=0x41ffe8, table_data=0x400cf0 >> >lookup: e->start_ip_offset = ffffffffffffff7c >> >lookup: e->start_ip_offset = ffffffffffffff04 >> >_ULaarch64_dwarf_search_unwind_table: IP 400b8b inside range >> 400000-400d6c, but no explicit unwind info found >> >put_rs_cache: unmasking signals/interrupts and releasing >> lock >> >_ULaarch64_dwarf_step: returning -10 >> >_ULaarch64_step: dwarf_step()=-10 >> ==== >> >> It seem that dwarf_search_unwind_table() returns -UNW_ENOINFO(-10). >> >> Dose anyone have the same problem? >> Anyone has idea? > > Without more info, it sounds like missing unwind info? Maybe check > using readelf if you have unwind info for IP 400b8b. > > In older gcc versions it was sometimes necessary to pass extra flags, > like -funwind-tables, -fasynchronous-unwind-tables, or -fexceptions, > -fnon-call-exceptions, etc to get full unwind info for all IPs _______________________________________________ Libunwind-devel mailing list Libunwind-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/libunwind-devel