diff options
author | Mike Frysinger <vapier@chromium.org> | 2019-03-02 02:37:25 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2019-03-12 05:02:27 +0000 |
commit | 3ee9a0b27438910a8fcbc263fc0df8b901a78d71 (patch) | |
tree | 9c46c2ac14481fc7e932d58eb7c67aa11343530b /src/client/linux/minidump_writer/linux_dumper.h | |
parent | linux_core_dumper: add a fallback definition for NT_SIGINFO (diff) | |
download | breakpad-3ee9a0b27438910a8fcbc263fc0df8b901a78d71.tar.xz |
linux_core_dumper: support setting exception_information
Many signals in Linux support additional metadata on a per-signal
basis. We can extract that from NT_SIGINFO and pass it through
in the exception_information fields.
The current core dumper logic doesn't set exception_information
at all, so this is an improvement.
Bug: google-breakpad:791
Change-Id: I38b78d6494e9bc682441750d98ac9be5b0656f5a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1497662
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/client/linux/minidump_writer/linux_dumper.h')
-rw-r--r-- | src/client/linux/minidump_writer/linux_dumper.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.h b/src/client/linux/minidump_writer/linux_dumper.h index 76448fad..f4a75d90 100644 --- a/src/client/linux/minidump_writer/linux_dumper.h +++ b/src/client/linux/minidump_writer/linux_dumper.h @@ -38,6 +38,7 @@ #ifndef CLIENT_LINUX_MINIDUMP_WRITER_LINUX_DUMPER_H_ #define CLIENT_LINUX_MINIDUMP_WRITER_LINUX_DUMPER_H_ +#include <assert.h> #include <elf.h> #if defined(__ANDROID__) #include <link.h> @@ -47,6 +48,8 @@ #include <sys/types.h> #include <sys/user.h> +#include <vector> + #include "client/linux/dump_writer_common/mapping_info.h" #include "client/linux/dump_writer_common/thread_info.h" #include "common/linux/file_id.h" @@ -184,6 +187,14 @@ class LinuxDumper { void set_crash_signal_code(int code) { crash_signal_code_ = code; } int crash_signal_code() const { return crash_signal_code_; } + void set_crash_exception_info(const std::vector<uint64_t>& exception_info) { + assert(exception_info.size() <= MD_EXCEPTION_MAXIMUM_PARAMETERS); + crash_exception_info_ = exception_info; + } + const std::vector<uint64_t>& crash_exception_info() const { + return crash_exception_info_; + } + pid_t crash_thread() const { return crash_thread_; } void set_crash_thread(pid_t crash_thread) { crash_thread_ = crash_thread; } @@ -236,6 +247,9 @@ class LinuxDumper { // The code associated with |crash_signal_|. int crash_signal_code_; + // The additional fields associated with |crash_signal_|. + std::vector<uint64_t> crash_exception_info_; + // ID of the crashed thread. pid_t crash_thread_; |