libunwind on Android
ken.werner at linaro.org
Fri Nov 18 15:52:53 UTC 2011
On 11/17/2011 05:58 PM, Ken Werner wrote:
> I'm about to finish my work on libunwind  and I'd like to give you a
> brief overview on the different Android branches. The good news is that
> - if you don't need to unwind via DWARF debug frame information  -
> there are no additional patches required for Android. You can just pull
> the latest version from upstream , create an Android.mk and build it.
> This is what the "android" branch does . The provided Android.mk
> re-uses the build system of libunwind and therefore relies on a few
> additional packages to be installed on the build system: autoconf
> libtool texlive-extra-utils. The Android.mk  uses autoreconf and
> libtool and will create three static libraries: libunwind.a
> libunwind-arm.a and libunwind-ptrace.a. The debuggerd of the
> linaro_android_2.3.5 branch requires a tiny patch  that adds the two
> libs to the LOCAL_STATIC_LIBRARIES.
> In case you want/prefer a classic Android.mk that doesn't use the
> autotools you can use the "android-20111114" branch . In addition to
> the Android.mk this one employs four header files that are normally
> generated by the configure script from the .in files . The makefile
> creates static and a shared version of libunwind.
> The third Android related libunwind branch is called "android-20111026"
>  and exists because a Linaro-Android manifest refers to a specific
> commit-id of this branch. Technically it's very similar to
> "android-20111114" but the history of the latter has been rebased.
> So, basically there are two ways of building libunwind for Android.
> Choose whatever suits your needs best. Happy unwinding!
>  https://wiki.linaro.org/KenWerner/Sandbox/libunwind
>  Unwinding via DWARF debug frames is nice to have but not a strict
> requirement on Android because most of the ELF file are stripped anyway
> and libunwind-ptrace can unwind the stack using the ARM specific unwind
> tables (-funwind-tables). Ping me if you still need the debug frame
> support - I've got a (hacky) patch for that on my hd.
>  http://www.nongnu.org/libunwind/download.html
>  git clone -b android git://git.linaro.org/people/kwerner/libunwind.git
>  git clone -b android-20111114
>  config.h, libunwind-common.h, libunwind.h and tdep/libunwind_i.h
>  git clone -b android-20111026
The autoconf based build approach caused trouble within the Linaro
Android build (#891753). Therefore I deleted the commits that introduced
the issue. The old code is still available on a new branch called
 git clone -b android-20111117
More information about the linaro-dev