libunwind-devel
[Top][All Lists]
Advanced

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

[Libunwind-devel] problem using libunwind on ARM platform


From: lunar12 lunartwix
Subject: [Libunwind-devel] problem using libunwind on ARM platform
Date: Sat, 28 May 2016 10:23:29 +0800

Got segfault in unw_step() on our ARMv7 embedded Linux with Linaro
arm-linux-gnueabihf-gcc when trying to implement backtrace liked
functions.
After some investigation, it is found that the dwarf_get () in
include/tdep-arm/libunwind_i.h may got invalid address from
DWARF_GET_LOC (loc)
I modified the function to print out problematic address as following:

dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
{

  if (!DWARF_GET_LOC (loc))
    return -1;

/****/
  if(0x80000001>(unsigned int)DWARF_GET_LOC (loc)
          || (0xF0000000<((unsigned int)DWARF_GET_LOC (loc))
                  ) )
  {
      printf("!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x%08X\n",(unsigned
int)DWARF_GET_LOC (loc));
      return -1;
  }


  *val = *(unw_word_t *) DWARF_GET_LOC (loc);

  return 0;
}

Then got following output:
!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004

!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0xFFFFFFF8
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x000000A0
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x10000000
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000004

!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x00000014
!!!!!!!!!!!! DWARF_GET_LOC (loc) = 0x7C393432

Our libraries are built with "-funwind-tables" but stripped with "-s" options.
Can libunwind be used with this condition??

Thanks



reply via email to

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