From 2f56276fbfe519913845565f178cfa385da93657 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Thu, 19 Jul 2012 22:03:39 +0000 Subject: Allow adding extra memory regions to minidump on linux/windows A=Bill McCloskey R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=662646 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@989 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/linux/minidump_writer/minidump_writer.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/client/linux/minidump_writer/minidump_writer.h') diff --git a/src/client/linux/minidump_writer/minidump_writer.h b/src/client/linux/minidump_writer/minidump_writer.h index e79eb79b..4ff3b469 100644 --- a/src/client/linux/minidump_writer/minidump_writer.h +++ b/src/client/linux/minidump_writer/minidump_writer.h @@ -51,6 +51,16 @@ struct MappingEntry { // A list of typedef std::list MappingList; +// These entries store a list of memory regions that the client wants included +// in the minidump. +struct AppMemory { + AppMemory(void *ptr, size_t length) : ptr(ptr), length(length) {} + + void *ptr; + size_t length; +}; +typedef std::list AppMemoryList; + // Write a minidump to the filesystem. This function does not malloc nor use // libc functions which may. Thus, it can be used in contexts where the state // of the heap may be corrupt. @@ -64,13 +74,16 @@ typedef std::list MappingList; bool WriteMinidump(const char* filename, pid_t crashing_process, const void* blob, size_t blob_size); -// This overload also allows passing a list of known mappings. +// This overload also allows passing a list of known mappings and +// a list of additional memory regions to be included in the minidump. bool WriteMinidump(const char* filename, pid_t crashing_process, const void* blob, size_t blob_size, - const MappingList& mappings); + const MappingList& mappings, + const AppMemoryList& appdata); bool WriteMinidump(const char* filename, const MappingList& mappings, + const AppMemoryList& appdata, LinuxDumper* dumper); } // namespace google_breakpad -- cgit v1.2.1