libunwind on Android

Ken Werner ken.werner at linaro.org
Fri Nov 18 15:52:53 UTC 2011


On 11/17/2011 05:58 PM, Ken Werner wrote:
> Hi,
>
> I'm about to finish my work on libunwind [1] 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 [2] -
> there are no additional patches required for Android. You can just pull
> the latest version from upstream [3], create an Android.mk and build it.
> This is what the "android" branch does [4]. 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 [5] 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 [6] 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 [7]. In addition to
> the Android.mk this one employs four header files that are normally
> generated by the configure script from the .in files [8]. The makefile
> creates static and a shared version of libunwind.
>
> The third Android related libunwind branch is called "android-20111026"
> [9] 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!
>
> Regards
> Ken
>
> [1] https://wiki.linaro.org/KenWerner/Sandbox/libunwind
>
> [2] 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.
>
> [3] http://www.nongnu.org/libunwind/download.html
>
> [4] git clone -b android git://git.linaro.org/people/kwerner/libunwind.git
>
> [5]
> http://git.linaro.org/gitweb?p=people/kwerner/libunwind.git;a=blob;f=Android.mk;hb=android
>
>
> [6]
> http://people.linaro.org/~kwerner/android/debuggerd/debuggerd-build.patch
>
> [7] git clone -b android-20111114
> git://git.linaro.org/people/kwerner/libunwind.git
>
> [8] config.h, libunwind-common.h, libunwind.h and tdep/libunwind_i.h
>
> [9] git clone -b android-20111026
> git://git.linaro.org/people/kwerner/libunwind.git

Hi,

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 
android-20111117.

Updated footnotes:
[4] git clone -b android-20111117 
git://git.linaro.org/people/kwerner/libunwind.git
[5] 
http://git.linaro.org/gitweb?p=people/kwerner/libunwind.git;a=blob;f=Android.mk;hb=android-20111117

Regards
Ken



More information about the linaro-dev mailing list