Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: minidump/minidump_exception_writer.h

Issue 698673002: Add MinidumpExceptionWriter::InitializeFromSnapshot() and test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump_init_from_snapshot_thread_new
Patch Set: Rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | minidump/minidump_exception_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_exception_writer.h
diff --git a/minidump/minidump_exception_writer.h b/minidump/minidump_exception_writer.h
index 33e877c59dc681e5445923fc1ccd215a8ec6c5f4..1578ad585b5ae23a58a9fd45076a6f5f1bc3fe43 100644
--- a/minidump/minidump_exception_writer.h
+++ b/minidump/minidump_exception_writer.h
@@ -23,9 +23,11 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "minidump/minidump_stream_writer.h"
+#include "minidump/minidump_thread_id_map.h"
namespace crashpad {
+class ExceptionSnapshot;
class MinidumpContextWriter;
//! \brief The writer for a MINIDUMP_EXCEPTION_STREAM stream in a minidump file.
@@ -34,6 +36,21 @@ class MinidumpExceptionWriter final : public internal::MinidumpStreamWriter {
MinidumpExceptionWriter();
~MinidumpExceptionWriter() override;
+ //! \brief Initializes the MINIDUMP_EXCEPTION_STREAM based on \a
+ //! exception_snapshot.
+ //!
+ //! \param[in] exception_snapshot The exception snapshot to use as source
+ //! data.
+ //! \param[in] thread_id_map A MinidumpThreadIDMap to be consulted to
+ //! determine the 32-bit minidump thread ID to use for the thread
+ //! identified by \a exception_snapshot.
+ //!
+ //! \note Valid in #kStateMutable. No mutator methods may be called before
+ //! this method, and it is not normally necessary to call any mutator
+ //! methods after this method.
+ void InitializeFromSnapshot(const ExceptionSnapshot* exception_snapshot,
+ const MinidumpThreadIDMap* thread_id_map);
+
//! \brief Arranges for MINIDUMP_EXCEPTION_STREAM::ThreadContext to point to
//! the CPU context to be written by \a context.
//!
« no previous file with comments | « no previous file | minidump/minidump_exception_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698