From 7e3c538af1bdee7f5a4c04e11715488f1d4efd15 Mon Sep 17 00:00:00 2001 From: "digit@chromium.org" Date: Fri, 31 Aug 2012 18:38:29 +0000 Subject: Add custom getcontext() implementation for Android. This adds a minimalistic implementation of getcontext() for Android/ARM and Android/x86. The provided code is in assembly and only implements the bare minimum required by Breakpad to get the current processor state. Note that: - The FPU state is not saved to the ucontext_t on ARM. (that's actually the main difference with a normal getcontext() implementation). This is normal. On Linux/ARM, such state must be obtained with PTRACE_GETVFPREGS instead. This will be implemented in a future patch. - On x86, only the 'regular' FPU state is saved, to mimic the GLibc/i386 implementation. The state of SSE/SSE2/etc registers is not part of the upstream getcontext() implementation. Review URL: https://breakpad.appspot.com/444002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1024 4c0a9323-5329-0410-9bdc-e9ce6186880e --- Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 14c7eebd..b6e579a6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -100,6 +100,10 @@ src_client_linux_libbreakpad_client_a_SOURCES = \ src/common/linux/linux_libc_support.cc \ src/common/linux/memory_mapped_file.cc \ src/common/linux/safe_readlink.cc +if ANDROID_HOST +src_client_linux_libbreakpad_client_a_SOURCES += \ + src/common/android/breakpad_getcontext.S +endif endif LINUX_HOST if !DISABLE_PROCESSOR @@ -337,6 +341,10 @@ src_client_linux_linux_client_unittest_SOURCES = \ src/processor/logging.cc \ src/processor/minidump.cc \ src/processor/pathname_stripper.cc +if ANDROID_HOST +src_client_linux_linux_client_unittest_SOURCES += \ + src/common/android/breakpad_getcontext.S +endif src_client_linux_linux_client_unittest_CPPFLAGS = \ -I$(top_srcdir)/src \ @@ -364,6 +372,8 @@ src_client_linux_linux_client_unittest_LDADD = \ src/common/string_conversion.o \ $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) if ANDROID_HOST +src_client_linux_linux_client_unittest_SOURCES += \ + src/common/android/breakpad_getcontext_unittest.cc src_client_linux_linux_client_unittest_LDFLAGS = \ -llog endif -- cgit v1.2.1