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/handler/exception_handler.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/client/linux/handler/exception_handler.cc') diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc index f505ff33..fffc3e64 100644 --- a/src/client/linux/handler/exception_handler.cc +++ b/src/client/linux/handler/exception_handler.cc @@ -465,7 +465,8 @@ bool ExceptionHandler::DoDump(pid_t crashing_process, const void* context, crashing_process, context, context_size, - mapping_list_); + mapping_list_, + app_memory_list_); } // static @@ -515,4 +516,19 @@ void ExceptionHandler::AddMappingInfo(const string& name, mapping_list_.push_back(mapping); } +void ExceptionHandler::RegisterAppMemory(void *ptr, size_t length) { + app_memory_list_.push_back(AppMemory(ptr, length)); +} + +void ExceptionHandler::UnregisterAppMemory(void *ptr) { + for (AppMemoryList::iterator iter = app_memory_list_.begin(); + iter != app_memory_list_.end(); + ++iter) { + if (iter->ptr == ptr) { + app_memory_list_.erase(iter); + return; + } + } +} + } // namespace google_breakpad -- cgit v1.2.1