aboutsummaryrefslogtreecommitdiff
path: root/src/common/android
Commit message (Collapse)AuthorAgeFilesLines
* fix pointer style to match the style guideMike Frysinger2020-07-151-1/+1
| | | | | | | | | | We do this in a lot of places, but we're inconsistent. Normalize the code to the Google C++ style guide. Change-Id: Ic2aceab661ce8f6b993dda21b1cdf5d2198dcbbf Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2262932 Reviewed-by: Sterling Augustine <saugustine@google.com> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Use ULONG_MAX instead of __WORDSIZE to determine native ELF architectureMichael Forney2020-03-171-11/+0
| | | | | | | | | | | | | | __WORDSIZE is an internal libc definition. Instead, we can use ULONG_MAX from limits.h, whose value corresponds to the machine's native word size. This allows us to remove the fallback definition of __WORDSIZE in the Android compatibility headers. Bug: google-breakpad:631 Change-Id: I7b9e6f3b2121f78ccad9e32bf26acac518aefd8f Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2107100 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use breakpad_getcontext on all Linux platforms missing getcontextMichael Forney2020-03-164-872/+0
| | | | | | | | | | | | | | | | | | | | getcontext is also not available on musl libc, so generalize breakpad_getcontext so it can be used as a fallback for non-Android platforms as well. On x86_64 and i386, ucontext_t uses an Android-specific offset for storage of FP registers, since its sigset_t differs in size. So, make the definition of MCONTEXT_FPREGS_MEM and UCONTEXT_FPREGS_MEM_OFFSET conditional on whether we are building for Android. On glibc and musl, signal.h and asm/sigcontext.h can't be included together, so in breakpad_context_unittest.cc, only compare the libc and kernel _fpstate when on Android. Bug: google-breakpad:631 Change-Id: If81d73c4101bae946e9a3655b8d1c40a34ab6c38 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2102135 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Remove sys/signal.h compatibility headerMichael Forney2020-03-111-35/+0
| | | | | | | | Since a03ad96dbd, sys/signal.h is no longer required. Change-Id: I64e6235e1bffb3728d6050389bad6e7a99389741 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2097666 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Use sched_yield instead of pthread_yieldMichael Forney2020-03-101-5/+0
| | | | | | | | | | | | | | | | | | | | | pthread_yield is not a standard POSIX function, and is not available in musl libc. The man page says to "Use the standardized sched_yield(2) instead"[0]. On glibc, pthread_yield is exactly equivalent to sched_yield[1]. On bionic, pthread_yield is also not available, so on Android, the tests define a wrapper that just calls sched_yield. This wrapper is no longer necessary if we just use sched_yield in the first place. [0] http://man7.org/linux/man-pages/man3/pthread_yield.3.html [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_yield.c Bug: google-breakpad:631 Change-Id: Ie4c6be8c17cdc2f5396a7fe972fa51a97573b049 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2097340 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* Add asm and machine headersbsheedy2018-01-035-7/+525
| | | | | | | | | | | Adds asm/ and machine/ directories to src/common/android/include. This is necessary because some required files for MIPS were removed in newer Android NDK versions, which broke Breakpad compilation. Bug: 771171 Change-Id: Ie6a079b6b8130b549ebc6d0bc4aef0e47e7bd6c2 Reviewed-on: https://chromium-review.googlesource.com/835282 Reviewed-by: Mark Mentovai <mark@chromium.org>
* android: drop sgidefs.h hack for LSSMike Frysinger2017-12-231-41/+0
| | | | | | | | | | | Breakpad shouldn't be hacking up headers for LSS. This was eventually fixed in LSS directly in https://codereview.chromium.org/1248033002, so we can drop this hack on our side. Change-Id: Iff29efe7f6af40835e0aab1f6ac3fd8d167045ef Reviewed-on: https://chromium-review.googlesource.com/843124 Reviewed-by: Mark Seaborn <mseaborn@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
* Android: Use sys/types.h instead of stdint.h for sys/user.hJoshua Peraza2017-10-061-1/+1
| | | | | | | | | | When using traditional headers, sys/types.h is needed to define __u64 for sys/user.h. Previously, we thought this would be provided by stdint.h, but it is not. Change-Id: I0e648712f4ef1e303104a5264d3d2d0b218f5d45 Reviewed-on: https://chromium-review.googlesource.com/705267 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Restore missing #include <stdint.h> to Android <sys/user.h>Mark Mentovai2017-09-201-0/+4
| | | | | | | | | | This was lost in afa9c52715db, but it turns out that it’s still necessary. Bug: google-breakpad:733 Change-Id: I4e0e4e4d2e80c22df1ff6b82e471905773c940a3 Reviewed-on: https://chromium-review.googlesource.com/675732 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* android: Don’t compete with NDK API >= 21 over NDK structuresMark Mentovai2017-09-182-39/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chrome uses API 16 for 32-bit builds and API 21 for 64-bit builds. The NDK’s <link.h> provides r_debug and link_map structure definitions only at API 21 and above. Breakpad used a custom <link.h> to define these structures only during 64-bit builds, which worked for Chrome’s purposes. However, other consumers may wish to build Breakpad at arbitrary API levels without regard to bitness. This alters Breakpad’s custom <link.h> to correctly check the NDK API level rather than target CPU bitness. Likewise for <sys/user.h> on 32-bit x86, which provided a typedef for user_fpxregs_struct to user_fxsr_struct. API 21 and above, as well as the unified headers at any API level, always name the structure user_fpxregs_struct. Definitions for 64-bit ARM’s user_regs_struct and user_fpsimd_struct have been removed from Breakpad’s copy of <sys/user.h>. The header claims that these fallback definitions are only necessary with NDK r10, which should no longer be in use even by Chromium, which now uses NDK r12b. This removes the Chromium-specific ANDROID_NDK_MAJOR_VERSION macro from use entirely. Fixes https://stackoverflow.com/questions/44141159/ and b/65630828. Bug: google-breakpad:733 Change-Id: I5841906297cd15b15ce48b73fd8332fd40afc9a0 Reviewed-on: https://chromium-review.googlesource.com/665740 Reviewed-by: Primiano Tucci <primiano@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
* Revert "Don't define |r_debug| and |link_map| on Android releases 21 and later"Sylvain Defresne2016-08-101-21/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0fc6d0c8dfbb6e4226fd79c622b701a62c901f14 because it does not compile in Chromium due to the following error: In file included from ../../breakpad/src/client/linux/minidump_writer/linux_dumper.h:43:0, from ../../breakpad/src/client/linux/minidump_writer/minidump_writer.h:41, from ../../breakpad/src/client/linux/handler/exception_handler.h:42, from ../../components/crash/content/app/breakpad_linux.cc:44: ../../breakpad/src/common/android/include/link.h:46:9: error: multi-line comment [-Werror=comment] #endif // !defined(__aarch64__) && !defined(__x86_64__) && \ ^ > Don't define |r_debug| and |link_map| on Android releases 21 and later > > NDKs for Android 21 and later have the data structures |r_debug| and > |link_map| defined in their header files. Defining them multiple times > generates a compiler error. > > This patch protects both data structures from definition on Android 21 > and later. > > BUG=629088 > R=rmcilroy@chromium.org > > Review URL: https://codereview.chromium.org/2156173002 . > > Patch from Thomas Zimmermann <tzimmermann@mozilla.com>. > > Committed: https://chromium.googlesource.com/breakpad/breakpad/+/0ebdc4a10a506e2a4a3a039c479b40219a84b760 BUG=629088 Change-Id: Ia8d7d0eff060d661113e544d732813820bcb69e0 Reviewed-on: https://chromium-review.googlesource.com/367717 Reviewed-by: Mark Mentovai <mark@chromium.org>
* Don't define |r_debug| and |link_map| on Android releases 21 and laterThomas Zimmermann2016-08-031-5/+21
| | | | | | | | | | | | | | | | | | NDKs for Android 21 and later have the data structures |r_debug| and |link_map| defined in their header files. Defining them multiple times generates a compiler error. This patch protects both data structures from definition on Android 21 and later. BUG=629088 R=rmcilroy@chromium.org Review URL: https://codereview.chromium.org/2156173002 . Patch from Thomas Zimmermann <tzimmermann@mozilla.com>. Committed: https://chromium.googlesource.com/breakpad/breakpad/+/0ebdc4a10a506e2a4a3a039c479b40219a84b760
* Revert "Don't define |r_debug| and |link_map| on Android releases 21 and later"Ross McIlroy2016-07-201-10/+2
| | | | | | | | | | | This reverts commit 0fc10739232ac803f7304d01522db6051c7454ff. Reason: breaks 64bit Android architectures. BUG=629088 R=primiano@chromium.org Review URL: https://codereview.chromium.org/2163923002 .
* Don't define |r_debug| and |link_map| on Android releases 21 and laterThomas Zimmermann2016-07-191-2/+10
| | | | | | | | | | | | | | | | NDKs for Android 21 and later have the data structures |r_debug| and |link_map| defined in their header files. Defining them multiple times generates a compiler error. This patch protects both data structures from definition on Android 21 and later. BUG=629088 R=rmcilroy@chromium.org Review URL: https://codereview.chromium.org/2156173002 . Patch from Thomas Zimmermann <tzimmermann@mozilla.com>.
* [Android] Guard some NDK workarounds by major version.John Budorick2016-07-151-1/+11
| | | | | | | BUG=599327 R=mark@chromium.org Review URL: https://codereview.chromium.org/2152153003 .
* [Android] Roll back to r10e.Primiano Tucci2016-06-061-5/+21
| | | | | | | | BUG=599327 R=primiano@chromium.org TBR=mark@chromium.org Review URL: https://codereview.chromium.org/2042873003 .
* [Android] Revert x86 workaround changes for NDK r11c.Primiano Tucci2016-06-061-0/+11
| | | | | | | | BUG=599327 R=primiano@chromium.org TBR=mark@chromium.org Review URL: https://codereview.chromium.org/2035343002 .
* [Android] Update breakpad to NDK r11c.Primiano Tucci2016-06-021-31/+4
| | | | | | | BUG=599327 R=mark@chromium.org, primiano@chromium.org Review URL: https://codereview.chromium.org/2025923003 .
* [mips64] Support for mips n64Mike Frysinger2016-02-061-2/+2
| | | | | | | | | | Adding remaining mips n64 support including stackwalker. BUG=None TEST=manually tested on Linux/Android R=vapier@chromium.org Review URL: https://codereview.chromium.org/1418453011 .
* Add user_regs_struct and user_fpsimd_struct for aarch64 on Android.rmcilroy@chromium.org2015-08-201-18/+23
| | | | | | | | | | | | | | | | | | Android's sys/user.h is missing user_regs_struct and user_fpsimd_struct. Add them to the Android specific user.h used by breakpad to workaround Android / glibc compatibility issues. A bug has been filed on the Android NDK team to add the missing structures to the NDK, at which point this hack can be removed. Also remove the mxcsr_mask hack on x64, which is no longer required since we have moved to the r10d NDK which fixes this issue. R=primiano@chromium.org Review URL: https://codereview.chromium.org/1291983003 . git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1495 4c0a9323-5329-0410-9bdc-e9ce6186880e
* [MIPS]: Use mcontext_t structure for MIPSrmcilroy@chromium.org2015-04-212-78/+3
| | | | | | | | | | | | | | This change removes user_regs_struct and user_fpregs_struct structures for mips and uses mcontext_t instead. R=fdegans@chromium.org, mark@chromium.org, rmcilroy@chromium.org Review URL: https://breakpad.appspot.com/3744002 Patch from Gordana Cmiljanovic <Gordana.Cmiljanovic@imgtec.com>. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1452 4c0a9323-5329-0410-9bdc-e9ce6186880e
* MIPS64: Initial MIPS64 related change.mark@chromium.org2015-04-154-12/+122
| | | | | | | | | | | With this change Breakpad can be compiled for MIPS64, but it is not yet functional. Patch by Gordana Cmiljanovic <Gordana.Cmiljanovic@imgtec.com> Review URL: https://breakpad.appspot.com/6824002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1446 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compatibility with Android NDK r10d.primiano@chromium.org2015-03-161-2/+20
| | | | | | | | | | | | | | | | This is a reland of the previous CL (r1433). r1433 did not achieve what intended and failed the x86_64 build of Chrome with NDK r10c. The workaround logic in this CL is identical to r1433, but the #define magic is applied in a more appropriate proper place this time. Turns out Breakpad already has an Android compatibility layer, which is common/android/include. Piggybacking the fix there. BUG=breakpad:642 R=fdegans@chromium.org, rmcilroy@chromium.org Review URL: https://breakpad.appspot.com/3794002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1434 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix breakpad on mips and x86_64 for the NDK r10c update.primiano@chromium.org2014-10-242-3/+87
| | | | | | | | | | | | | | This change introduces the necessary glue typedefs to deal with the mismatch introduced by the latest Android NDK (w.r.t. desktop Linux): - [x86_64] Rename fpregs mxcr_mask -> .mxcsr_mask - [mips] uc_mcontext.fpregs.fp_r.fp_dregs -> uc_mcontext.fpreg - [mips] restore the forked user.h Submitting this on behalf of fdegans@chromium.org TBR=mark@chromium.org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1397 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Update breakpad to support Android NDK r10cprimiano@chromium.org2014-10-212-444/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to NDK r10c, Breakpad was privately backporting these system headers. This change is now unforking and removing those headers and using the ones from the NDK. Rationale: - They are finally available in the NDK, so there is no need to keep maintaining a fork (which was necessary up until recently to support arm64). - These forked headers, as they are today, are not compatible with the latest NDK (i.e. this change is required to roll NDK r10c). The forked ucontext.h, being removed by this CL, depends on some transitional features which are not compatible with the NDK release being targeted here. After this change, the NDK r10c is now required to build Breakpad on Android. Note that NDK releases are backwards compatible and contain all the previous API levels, so this change is NOT effectively enforcing to build against any particular Android SDK. Submitting this on behalf of fdegans@chromium.org BUG=chromium:358831 R=mark@chromium.org, primiano@chromium.org, rmcilroy@chromium.org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1396 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Revert "Remove unecessary headers following NDK r10c update."primiano@chromium.org2014-10-212-0/+484
| | | | | | | | | | | | | This reverts r1394. Reason for the revert: r1394 is breaking compatibility with previous NDK (< r10c). BUG=chromium:358831 R=rmcilroy@chromium.org Review URL: https://breakpad.appspot.com/6754003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1395 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove unecessary headers following NDK r10c update.primiano@chromium.org2014-10-212-484/+0
| | | | | | | | | BUG=chromium:358831 R=primiano@chromium.org, rmcilroy@chromium.org Review URL: https://breakpad.appspot.com/10694002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1394 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix minor typo in a comment in r1331.rmcilroy@chromium.org2014-05-141-1/+1
| | | | | | | | R=qsr@google.com Review URL: https://breakpad.appspot.com/3674002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1332 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix x86_64 Android build after user_fpregs_struct was added to /sys/user.h ↵rmcilroy@chromium.org2014-05-141-3/+8
| | | | | | | | | | | in newer NDKs BUG=346626 TBR=mark@chromium.org Review URL: https://breakpad.appspot.com/2694002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1331 4c0a9323-5329-0410-9bdc-e9ce6186880e
* [MIPS] Fix core dump related unit tests for Android on MIPSgordana.cmiljanovic@imgtec.com2014-05-142-0/+53
| | | | | | | | | | | | | | | This change fixes failing unittests in Android on MIPS: LinuxCoreDumperTest.VerifyDumpWithMultipleThreads ElfCoreDumpTest.ValidCoreFile BUG=None TEST=Running breakpad_unittests on MIPS Android device Review URL: https://breakpad.appspot.com/3664002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1330 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Update offset of fpregs_mem.rmcilroy@chromium.org2014-04-152-2/+2
| | | | | | | | | | | | | Based on testing in the emulator. BUG=346626 R=thestig@chromium.org Review URL: https://breakpad.appspot.com/1544002 Patch from Anton Carver <anton@chromium.org>. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1312 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add x64 version of getcontext.rmcilroy@chromium.org2014-04-115-0/+275
| | | | | | | | | | | | | Assembly code is derived in part from code in libunwind. Code tested on desktop linux (Android testing pending emulation support). BUG=346626 R=dannyb@google.com, thestig@chromium.org Review URL: https://breakpad.appspot.com/1454002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1311 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix aarch64 ucontext layout on Androidrmcilroy@chromium.org2014-04-094-9/+23
| | | | | | | | | BUG=354405,335641 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1444002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1306 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add Arm64 support to breakpad unittests.rmcilroy@chromium.org2014-04-081-0/+1
| | | | | | | | | BUG=354405,335641 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1424002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1305 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add Arm64 version of breakpad_getcontext for Android.rmcilroy@chromium.org2014-04-032-9/+109
| | | | | | | | | | | | This CL adds breakpad_getcontext support for Arm64 to Android. The assembly is based on getcontext.S in glibc. BUG=354405,335641 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1384002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1302 4c0a9323-5329-0410-9bdc-e9ce6186880e
* First cut at adding arm64 Linux / Android support to Breakpad.rmcilroy@chromium.org2014-04-027-3/+43
| | | | | | | | | | | | | | This is an initial attempt to add Arm64 (aarch64) support to Breakpad for Linux / Android platforms. This CL adds the Arm64 data structures, but does not yet implement the Android getcontext support or CPUFillFromThreadInfo / CPUFillFromUContext. BUG=354405,335641 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1354002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1301 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Remove some unecessary Android system header definitions.rmcilroy@chromium.org2014-04-023-58/+6
| | | | | | | | | | | Newer NDKs include some additional headers needed by Breakpad, so we can remove these redefinitions. BUG=358831,335641,354405 R=mark@chromium.org Review URL: https://breakpad.appspot.com/1374002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1300 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Misc Android-related fixes.digit@chromium.org2013-12-131-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - src/common/android/testing/mkdtemp.h: Fixes a compilation error when using the (recent) NDK r9b, see comments in the source file for details. - android/test-driver, Makefile.am, Makefile.in: Autotools 1.12 changed the way tests are run during "make check" so add a new "custom test driver" to run tests on Android, and modify Makefile.am / Makefile.in accordingly. Otherwise, 'make check' tried to run the tests on the host. - android/test-shell.sh: Allow several tests to run in parallel on the device, by creating a custom test directory for each test process. This allows running "make check -j8" reliably. - src/common/linux/file_id_unittest.cc: Disable the SelfStrip test on Android, since it assumes a 'strip' executable is available on the target system where the test runs. BUG=NONE R=mark@chromium.org, ted.mielczarek@gmail.com TEST=android/run-checks.sh --ndk-dir=/path/to/android-ndk-r9b Review URL: https://breakpad.appspot.com/904003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1259 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix the Android/MIPS build.digit@chromium.org2013-09-252-0/+55
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the build for Android on MIPS when using the latest official Android NDK (r9): - Update src/common/android/include/elf.h to add a missing definition for SHT_MIPS_DWARF. - Add src/common/android/include/sgidefs.h required by LSS when compiling for MIPS. - Update android/run-checks.sh to work properly with the --abi=mips option. All tests were passed succesfully with an emulator system image running Android 4.2. - Update other Android-specific files. R=Petar.Jovanovic@imgtec.com, mark@chromium.org Review URL: https://breakpad.appspot.com/633002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1216 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Adding mips support for Android.gordana.cmiljanovic@imgtec.com2013-09-255-5/+114
| | | | | | | | | | | | | | Mips linux support has been added previously in r1212. Some additional changes are required to make breakpad functional on Android. BUG=none TEST=build, unittests, chrome test application Review URL: https://breakpad.appspot.com/632002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1215 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix some issues with -Werror=sign-compare on Android buildsted.mielczarek@gmail.com2013-02-012-8/+13
| | | | | | R=digit at https://breakpad.appspot.com/524002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1110 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix minor Android build failure with Clang.digit@chromium.org2012-10-041-0/+1
| | | | | | Review URL: https://breakpad.appspot.com/478003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1060 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add custom getcontext() implementation for Android.digit@chromium.org2012-08-315-6/+339
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix Breakpad unit tests build for Android.digit@chromium.org2012-08-233-0/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the source-related fixes to ensure that the Breakpad unit tests build properly when targetting Android. Calling 'make check' still fails because there is still no way to run the unit test programs on a device. This will be addressed by a future patch. Important notes: - You must target Android API level 9 (Gingerbread) or higher to build the unit tests. This requirement is due to the current GTest revision used in the breakpad source tree. - This patch adds headers providing inlined C library functions missing from the NDK (see src/common/android/testing). They are inlined to avoid modifying Makefile.am and other build files. - Similarly, the <wchar.h> header-fix under src/common/android/testing/include is only required by GTest's current revision. E.g. it's not needed when building Breakpad as part of Chromium which uses a more up-to-date revision. Review URL: https://breakpad.appspot.com/439002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1020 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Improve Android supportdigit@chromium.org2012-08-219-0/+851
This patch remove many Android-specific #ifdefs from the Breakpad source code. This is achieved by providing "fixed-up" platform headers (e.g. <signal.h> or <sys/user,h>), in the new directory src/common/android/include/, which masks differences between the NDK and GLibc headers. The old "android_link.h" and "android_ucontext.h" are moved and renamed. This also requires putting this directory as the first include path during Android-hosted builds, hence the modification of Makefile.am and configure.ac Review URL: https://breakpad.appspot.com/434002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1017 4c0a9323-5329-0410-9bdc-e9ce6186880e