diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-12-13 22:10:23 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-12-13 22:10:23 +0000 |
commit | ef7262d4775bf6de750bc2a26dbf98368d7ec0c3 (patch) | |
tree | a85d6b8c2b66f2da9fdbef3fd0a936dd7f566ac4 /src/client/linux/handler/exception_handler.h | |
parent | Reuse code and fix inconsistent array boundaries. (diff) | |
download | breakpad-ef7262d4775bf6de750bc2a26dbf98368d7ec0c3.tar.xz |
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
Diffstat (limited to 'src/client/linux/handler/exception_handler.h')
-rw-r--r-- | src/client/linux/handler/exception_handler.h | 18 |
1 files changed, 17 insertions, 1 deletions
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 <vector> #include <string> +#include <vector> #include <pthread.h> #include <signal.h> +#include <stdint.h> #include <stdio.h> #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/<pid>/maps. + MappingList mapping_list_; }; } // namespace google_breakpad |