From 5f57e963d04bf7552d0939725c43c4806a05808f Mon Sep 17 00:00:00 2001 From: "qsr@chromium.org" Date: Mon, 20 Aug 2012 13:42:09 +0000 Subject: Getting context information from the kernel when catching a SIGABRT on iOS. Until now, the context information was the current one when receiving a SIGABRT. This is mainly wrong because the signal handler start in a new context. This instead use the context passed to the signal handler. Review URL: https://breakpad.appspot.com/435002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1015 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/handler/minidump_generator.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/client/mac/handler/minidump_generator.h') diff --git a/src/client/mac/handler/minidump_generator.h b/src/client/mac/handler/minidump_generator.h index 8394ce6f..ef947841 100644 --- a/src/client/mac/handler/minidump_generator.h +++ b/src/client/mac/handler/minidump_generator.h @@ -102,6 +102,11 @@ class MinidumpGenerator { exception_thread_ = thread_name; } + // Specify the task context. If |task_context| is not NULL, it will be used + // to retrieve the context of the current thread, instead of using + // |thread_get_state|. + void SetTaskContext(ucontext_t *task_context); + // Gather system information. This should be call at least once before using // the MinidumpGenerator class. static void GatherSystemInformation(); @@ -198,7 +203,10 @@ class MinidumpGenerator { static int os_major_version_; static int os_minor_version_; static int os_build_number_; - + + // Context of the task to dump. + ucontext_t *task_context_; + // Information about dynamically loaded code DynamicImages *dynamic_images_; -- cgit v1.2.1