From ef7262d4775bf6de750bc2a26dbf98368d7ec0c3 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Mon, 13 Dec 2010 22:10:23 +0000 Subject: allow passing info about known memory mappings to MinidumpWriter and ExceptionHandler r=thestig at http://breakpad.appspot.com/242001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@741 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/linux/handler/exception_handler.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/client/linux/handler/exception_handler.h') diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h index 82f7fb4c..e75517ea 100644 --- a/src/client/linux/handler/exception_handler.h +++ b/src/client/linux/handler/exception_handler.h @@ -30,17 +30,20 @@ #ifndef CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ #define CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ -#include #include +#include #include #include +#include #include #if defined(__ANDROID__) #include "client/linux/android_ucontext.h" #endif #include "client/linux/crash_generation/crash_generation_client.h" +#include "client/linux/minidump_writer/minidump_writer.h" +#include "google_breakpad/common/minidump_format.h" #include "processor/scoped_ptr.h" struct sigaction; @@ -181,6 +184,15 @@ class ExceptionHandler { return crash_generation_client_.get() != NULL; } + // Add information about a memory mapping. This can be used if + // a custom library loader is used that maps things in a way + // that the linux dumper can't handle by reading the maps file. + void AddMappingInfo(const std::string& name, + const u_int8_t identifier[sizeof(MDGUID)], + uintptr_t start_address, + size_t mapping_size, + size_t file_offset); + private: void Init(const std::string &dump_path, const int server_fd); @@ -236,6 +248,10 @@ class ExceptionHandler { // cloned process after creating it, until we have explicitly enabled // ptrace. This is used to store the file descriptors for the pipe int fdes[2]; + + // Callers can add extra info about mappings for cases where the + // dumper code cannot extract enough information from /proc//maps. + MappingList mapping_list_; }; } // namespace google_breakpad -- cgit v1.2.1