From 4621ee06914b2ebe963c93ea78fabf982cf670df Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Thu, 23 Sep 2010 14:55:50 +0000 Subject: Write a window of memory around the instruction pointer from the crashing thread to the minidump on OS X. R=nealsid at http://breakpad.appspot.com/200001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@699 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/handler/minidump_generator.h | 13 ++++++++++++- 1 file changed, 12 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 b065fba9..39f28402 100644 --- a/src/client/mac/handler/minidump_generator.h +++ b/src/client/mac/handler/minidump_generator.h @@ -37,8 +37,9 @@ #include #include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_format.h" +#include "common/memory.h" #include "common/mac/macho_utilities.h" +#include "google_breakpad/common/minidump_format.h" #include "dynamic_images.h" @@ -119,6 +120,7 @@ class MinidumpGenerator { // 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); @@ -165,6 +167,15 @@ class MinidumpGenerator { // Information about dynamically loaded code DynamicImages *dynamic_images_; + + // PageAllocator makes it possible to allocate memory + // directly from the system, even while handling an exception. + mutable PageAllocator allocator_; + + // 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. + wasteful_vector memory_blocks_; }; } // namespace google_breakpad -- cgit v1.2.1