diff options
Diffstat (limited to 'src/client/linux/handler')
-rw-r--r-- | src/client/linux/handler/exception_handler.cc | 2 | ||||
-rw-r--r-- | src/client/linux/handler/microdump_extra_info.h | 14 | ||||
-rw-r--r-- | src/client/linux/handler/minidump_descriptor.h | 43 |
3 files changed, 42 insertions, 17 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc index c8cb768a..8565bbb0 100644 --- a/src/client/linux/handler/exception_handler.cc +++ b/src/client/linux/handler/exception_handler.cc @@ -592,6 +592,8 @@ bool ExceptionHandler::DoDump(pid_t crashing_process, const void* context, context, context_size, mapping_list_, + minidump_descriptor_.skip_dump_if_principal_mapping_not_referenced(), + minidump_descriptor_.address_within_principal_mapping(), *minidump_descriptor_.microdump_extra_info()); } if (minidump_descriptor_.IsFD()) { diff --git a/src/client/linux/handler/microdump_extra_info.h b/src/client/linux/handler/microdump_extra_info.h index 40cba1c4..bf01f0c7 100644 --- a/src/client/linux/handler/microdump_extra_info.h +++ b/src/client/linux/handler/microdump_extra_info.h @@ -40,23 +40,11 @@ struct MicrodumpExtraInfo { const char* gpu_fingerprint; const char* process_type; - // |interest_range_start| and |interest_range_end| specify a range - // in the target process address space. Microdumps are only - // generated if the PC or a word on the captured stack point into - // this range, or |suppress_microdump_based_on_interest_range| is - // false. - bool suppress_microdump_based_on_interest_range; - uintptr_t interest_range_start; - uintptr_t interest_range_end; - MicrodumpExtraInfo() : build_fingerprint(NULL), product_info(NULL), gpu_fingerprint(NULL), - process_type(NULL), - suppress_microdump_based_on_interest_range(false), - interest_range_start(0), - interest_range_end(0) {} + process_type(NULL) {} }; } diff --git a/src/client/linux/handler/minidump_descriptor.h b/src/client/linux/handler/minidump_descriptor.h index 782a60a4..f601427c 100644 --- a/src/client/linux/handler/minidump_descriptor.h +++ b/src/client/linux/handler/minidump_descriptor.h @@ -53,14 +53,18 @@ class MinidumpDescriptor { MinidumpDescriptor() : mode_(kUninitialized), fd_(-1), - size_limit_(-1) {} + size_limit_(-1), + address_within_principal_mapping_(0), + skip_dump_if_principal_mapping_not_referenced_(false) {} explicit MinidumpDescriptor(const string& directory) : mode_(kWriteMinidumpToFile), fd_(-1), directory_(directory), c_path_(NULL), - size_limit_(-1) { + size_limit_(-1), + address_within_principal_mapping_(0), + skip_dump_if_principal_mapping_not_referenced_(false) { assert(!directory.empty()); } @@ -68,14 +72,18 @@ class MinidumpDescriptor { : mode_(kWriteMinidumpToFd), fd_(fd), c_path_(NULL), - size_limit_(-1) { + size_limit_(-1), + address_within_principal_mapping_(0), + skip_dump_if_principal_mapping_not_referenced_(false) { assert(fd != -1); } explicit MinidumpDescriptor(const MicrodumpOnConsole&) : mode_(kWriteMicrodumpToConsole), fd_(-1), - size_limit_(-1) {} + size_limit_(-1), + address_within_principal_mapping_(0), + skip_dump_if_principal_mapping_not_referenced_(false) {} explicit MinidumpDescriptor(const MinidumpDescriptor& descriptor); MinidumpDescriptor& operator=(const MinidumpDescriptor& descriptor); @@ -101,6 +109,23 @@ class MinidumpDescriptor { off_t size_limit() const { return size_limit_; } void set_size_limit(off_t limit) { size_limit_ = limit; } + uintptr_t address_within_principal_mapping() const { + return address_within_principal_mapping_; + } + void set_address_within_principal_mapping( + uintptr_t address_within_principal_mapping) { + address_within_principal_mapping_ = address_within_principal_mapping; + } + + bool skip_dump_if_principal_mapping_not_referenced() { + return skip_dump_if_principal_mapping_not_referenced_; + } + void set_skip_dump_if_principal_mapping_not_referenced( + bool skip_dump_if_principal_mapping_not_referenced) { + skip_dump_if_principal_mapping_not_referenced_ = + skip_dump_if_principal_mapping_not_referenced; + } + MicrodumpExtraInfo* microdump_extra_info() { assert(IsMicrodumpOnConsole()); return µdump_extra_info_; @@ -132,6 +157,16 @@ class MinidumpDescriptor { off_t size_limit_; + // This member points somewhere into the main module for this + // process (the module that is considerered interesting for the + // purposes of debugging crashes). + uintptr_t address_within_principal_mapping_; + + // If set, threads that do not reference the address range + // associated with |address_within_principal_mapping_| will not have their + // stacks logged. + bool skip_dump_if_principal_mapping_not_referenced_; + // The extra microdump data (e.g. product name/version, build // fingerprint, gpu fingerprint) that should be appended to the dump // (microdump only). Microdumps don't have the ability of appending |