diff options
author | Tobias Sargeant <tobiasjs@google.com> | 2017-10-16 10:22:57 +0100 |
---|---|---|
committer | Tobias Sargeant <tobiasjs@chromium.org> | 2017-10-17 10:22:46 +0000 |
commit | 3d6076efc24ec6c74cba7729121bf45512a15ba2 (patch) | |
tree | e5d34a0da94672ed457674ab33007b75263103e6 /src/google_breakpad | |
parent | Convert {mini|micro}dump_stackwalk argument parsing to getopt. (diff) | |
download | breakpad-3d6076efc24ec6c74cba7729121bf45512a15ba2.tar.xz |
Add -s flag to microdump_stackwalk for dumping stack contents.
Note that the current MicrodumpProcessor::Process implementation has a
bug due to the fact that it creates a local Microdump instance, and then
holds onto a pointer to the object returned by microdump.GetMemory()
which is destroyed when microdump goes out of scope. This CL fixes the
crash by making Microdump outlive MicrodumpProcessor, which is the same
pattern that Minidump/MinidumpProcessor uses.
Bug: google-breakpad:748
Change-Id: I554b46d309649cf404523722bd9ee39e17a10139
Reviewed-on: https://chromium-review.googlesource.com/720809
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Diffstat (limited to 'src/google_breakpad')
-rw-r--r-- | src/google_breakpad/processor/microdump.h | 1 | ||||
-rw-r--r-- | src/google_breakpad/processor/microdump_processor.h | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/google_breakpad/processor/microdump.h b/src/google_breakpad/processor/microdump.h index b5df132c..02ebdcd7 100644 --- a/src/google_breakpad/processor/microdump.h +++ b/src/google_breakpad/processor/microdump.h @@ -133,4 +133,3 @@ class Microdump { } // namespace google_breakpad #endif // GOOGLE_BREAKPAD_PROCESSOR_MICRODUMP_H__ - diff --git a/src/google_breakpad/processor/microdump_processor.h b/src/google_breakpad/processor/microdump_processor.h index 1322a01c..60d14a54 100644 --- a/src/google_breakpad/processor/microdump_processor.h +++ b/src/google_breakpad/processor/microdump_processor.h @@ -40,9 +40,10 @@ namespace google_breakpad { +class Microdump; class ProcessState; class StackFrameSymbolizer; - + class MicrodumpProcessor { public: // Initializes the MicrodumpProcessor with a stack frame symbolizer. @@ -52,7 +53,7 @@ class MicrodumpProcessor { virtual ~MicrodumpProcessor(); // Processes the microdump contents and fills process_state with the result. - google_breakpad::ProcessResult Process(const string& microdump_contents, + google_breakpad::ProcessResult Process(Microdump* microdump, ProcessState* process_state); private: StackFrameSymbolizer* frame_symbolizer_; |