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

Unified Diff: minidump/minidump_module_writer.h

Issue 682263002: minidump: Add InitializeFromSnapshot() for MinidumpModuleWriter and MinidumpModuleListWriter (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Don’t allow failure Created 6 years, 2 months 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_module_writer.cc » ('j') | minidump/minidump_module_writer_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_module_writer.h
diff --git a/minidump/minidump_module_writer.h b/minidump/minidump_module_writer.h
index 4ec6ed4634510fcd7910ee009d30ef2e086e5d57..9fb10c2c31a7f7c0a726a8b9dcfe2f7ce558cc11 100644
--- a/minidump/minidump_module_writer.h
+++ b/minidump/minidump_module_writer.h
@@ -32,6 +32,8 @@
namespace crashpad {
+class ModuleSnapshot;
+
namespace internal {
class MinidumpUTF16StringWriter;
} // namespace internal
@@ -117,6 +119,16 @@ class MinidumpModuleCodeViewRecordPDB70Writer final
~MinidumpModuleCodeViewRecordPDB70Writer() override;
+ //! \brief Initializes the MinidumpModuleCodeViewRecordPDB70 based on \a
+ //! module_snapshot.
+ //!
+ //! \param[in] module_snapshot The module snapshot to use as source data.
+ //!
+ //! \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 ModuleSnapshot* module_snapshot);
+
//! \brief Sets MinidumpModuleCodeViewRecordPDB70::uuid and
//! MinidumpModuleCodeViewRecordPDB70::age.
void SetUUIDAndAge(const UUID& uuid, uint32_t age) {
@@ -176,6 +188,15 @@ class MinidumpModuleWriter final : public internal::MinidumpWritable {
MinidumpModuleWriter();
~MinidumpModuleWriter() override;
+ //! \brief Initializes the MINIDUMP_MODULE based on \a module_snapshot.
+ //!
+ //! \param[in] module_snapshot The module snapshot to use as source data.
+ //!
+ //! \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 ModuleSnapshot* module_snapshot);
+
//! \brief Returns a MINIDUMP_MODULE referencing this object’s data.
//!
//! This method is expected to be called by a MinidumpModuleListWriter in
@@ -294,6 +315,17 @@ class MinidumpModuleListWriter final : public internal::MinidumpStreamWriter {
MinidumpModuleListWriter();
~MinidumpModuleListWriter() override;
+ //! \brief Adds an initialized MINIDUMP_MODULE for each module in \a
+ //! module_snapshots to the MINIDUMP_MODULE_LIST.
+ //!
+ //! \param[in] module_snapshots The module snapshots to use as source data.
+ //!
+ //! \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 std::vector<const ModuleSnapshot*>& module_snapshots);
+
//! \brief Adds a MinidumpModuleWriter to the MINIDUMP_MODULE_LIST.
//!
//! This object takes ownership of \a module and becomes its parent in the
« no previous file with comments | « no previous file | minidump/minidump_module_writer.cc » ('j') | minidump/minidump_module_writer_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698