aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordigit@chromium.org <digit@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-08-20 20:22:05 +0000
committerdigit@chromium.org <digit@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-08-20 20:22:05 +0000
commitd270dcfa18acc0b9d65798a1f271f9859552244e (patch)
tree746196b2a83ef7507c6c36b8caf4016cab673b4a /src
parent Getting context information from the kernel when catching a SIGABRT on iOS. (diff)
downloadbreakpad-d270dcfa18acc0b9d65798a1f271f9859552244e.tar.xz
Fix Android build.
This patch fixes the Android build, and updates the NDK test application to use the new Linux ExceptionHandler API. + Use string insted of std::string in minidump_descriptor.h Review URL: https://breakpad.appspot.com/433002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1016 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/handler/exception_handler.cc5
-rw-r--r--src/client/linux/handler/minidump_descriptor.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index 61dc2a1a..f10cdbf1 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -326,11 +326,16 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
// This is a public interface to HandleSignal that allows the client to
// generate a crash dump. This function may run in a compromised context.
bool ExceptionHandler::SimulateSignalDelivery(int sig) {
+#ifdef __ANDROID__
+ // Android doesn't provide getcontext().
+ return false;
+#else
siginfo_t siginfo;
my_memset(&siginfo, 0, sizeof(siginfo_t));
struct ucontext context;
getcontext(&context);
return HandleSignal(sig, &siginfo, &context);
+#endif
}
// This function may run in a compromised context: see the top of the file.
diff --git a/src/client/linux/handler/minidump_descriptor.h b/src/client/linux/handler/minidump_descriptor.h
index 18e2cb41..5d331a3e 100644
--- a/src/client/linux/handler/minidump_descriptor.h
+++ b/src/client/linux/handler/minidump_descriptor.h
@@ -33,6 +33,8 @@
#include <assert.h>
#include <string>
+#include "common/using_std_string.h"
+
// The MinidumpDescriptor describes how to access a minidump: it can contain
// either a file descriptor or a path.
// Note that when using files, it is created with the path to a directory.
@@ -71,9 +73,9 @@ class MinidumpDescriptor {
const int fd_;
// The directory where the minidump should be generated.
- const std::string directory_;
+ const string directory_;
// The full path to the generated minidump.
- std::string path_;
+ string path_;
// The C string of |path_|. Precomputed so it can be access from a compromised
// context.
const char* c_path_;