aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-02-14 08:46:26 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-02-14 08:46:26 +0000
commit5d7f694f27c5e5f047db409f257dce6773c00fcf (patch)
treea4eaa2cb683125185bf5656a15739e83747ac98a /src/client/mac/handler
parentcreateDirectoryAtPath:attributes: is deprecated, use the suggested (10.5+) (diff)
downloadbreakpad-5d7f694f27c5e5f047db409f257dce6773c00fcf.tar.xz
Creating minidump for uncaught exception on iOS.
This CL adds a minidump_generator that can write a minidump from a NSException on iOS on an ARM cpu. This CL also install an uncaught exception handler on iOS, and use the previous generator to write minidumps for any uncaught exception. Review URL: https://breakpad.appspot.com/347001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@916 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler')
-rw-r--r--src/client/mac/handler/minidump_generator.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/client/mac/handler/minidump_generator.h b/src/client/mac/handler/minidump_generator.h
index f5a4d44a..80bb116c 100644
--- a/src/client/mac/handler/minidump_generator.h
+++ b/src/client/mac/handler/minidump_generator.h
@@ -82,7 +82,7 @@ class MinidumpGenerator {
MinidumpGenerator();
MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread);
- ~MinidumpGenerator();
+ virtual ~MinidumpGenerator();
// Return <dir>/<unique_name>.dmp
// Sets |unique_name| (if requested) to the unique name for the minidump
@@ -106,13 +106,19 @@ class MinidumpGenerator {
// the MinidumpGenerator class.
static void GatherSystemInformation();
+ protected:
+ // Overridable Stream writers
+ virtual bool WriteExceptionStream(MDRawDirectory *exception_stream);
+
+ // Overridable Helper
+ virtual bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread);
+
private:
- typedef bool (MinidumpGenerator::*WriteStreamFN)(MDRawDirectory *);
+ typedef bool (MinidumpGenerator::*WriteStreamFN)(MDRawDirectory *);
// Stream writers
bool WriteThreadListStream(MDRawDirectory *thread_list_stream);
bool WriteMemoryListStream(MDRawDirectory *memory_list_stream);
- bool WriteExceptionStream(MDRawDirectory *exception_stream);
bool WriteSystemInfoStream(MDRawDirectory *system_info_stream);
bool WriteModuleListStream(MDRawDirectory *module_list_stream);
bool WriteMiscInfoStream(MDRawDirectory *misc_info_stream);
@@ -128,7 +134,6 @@ class MinidumpGenerator {
MDMemoryDescriptor *stack_location);
bool WriteContext(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
- bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread);
bool WriteCVRecord(MDRawModule *module, int cpu_type,
const char *module_path, bool in_memory);
bool WriteModuleStream(unsigned int index, MDRawModule *module);
@@ -172,9 +177,11 @@ class MinidumpGenerator {
explicit MinidumpGenerator(const MinidumpGenerator &);
void operator=(const MinidumpGenerator &);
+ protected:
// Use this writer to put the data to disk
MinidumpFileWriter writer_;
+ private:
// Exception information
int exception_type_;
int exception_code_;
@@ -199,6 +206,7 @@ class MinidumpGenerator {
// directly from the system, even while handling an exception.
mutable PageAllocator allocator_;
+ protected:
// Blocks of memory written to the dump. These are all currently
// written while writing the thread list stream, but saved here
// so a memory list stream can be written afterwards.