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

Unified Diff: snapshot/win/process_snapshot_win.h

Issue 1126413008: win: Implement exception snapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes2 Created 5 years, 4 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 | « snapshot/win/process_reader_win.cc ('k') | snapshot/win/process_snapshot_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/process_snapshot_win.h
diff --git a/snapshot/win/process_snapshot_win.h b/snapshot/win/process_snapshot_win.h
index 97bb1c697033feaada78960683ec11733c053af3..9e668ef9c527e32ffe00660ff1c35f7eb0990442 100644
--- a/snapshot/win/process_snapshot_win.h
+++ b/snapshot/win/process_snapshot_win.h
@@ -31,11 +31,13 @@
#include "snapshot/process_snapshot.h"
#include "snapshot/system_snapshot.h"
#include "snapshot/thread_snapshot.h"
+#include "snapshot/win/exception_snapshot_win.h"
#include "snapshot/win/module_snapshot_win.h"
#include "snapshot/win/system_snapshot_win.h"
#include "snapshot/win/thread_snapshot_win.h"
#include "util/misc/initialization_state_dcheck.h"
#include "util/misc/uuid.h"
+#include "util/win/address_types.h"
#include "util/stdlib/pointer_container.h"
namespace crashpad {
@@ -55,6 +57,20 @@ class ProcessSnapshotWin final : public ProcessSnapshot {
//! an appropriate message logged.
bool Initialize(HANDLE process);
+ //! \brief Initializes the object's exception.
+ //!
+ //! This populates the data to be returned by Exception(). The parameters may
+ //! be passed directly through from a Windows exception handler.
+ //!
+ //! This method must not be called until after a successful call to
+ //! Initialize().
+ //!
+ //! \return `true` if the exception information could be initialized, `false`
+ //! otherwise with an appropriate message logged. When this method returns
+ //! `false`, the ProcessSnapshotWin object's validity remains unchanged.
+ bool InitializeException(DWORD thread_id,
+ WinVMAddress exception_pointers);
+
//! \brief Sets the value to be returned by ReportID().
//!
//! The crash report ID is under the control of the snapshot producer, which
@@ -113,7 +129,7 @@ class ProcessSnapshotWin final : public ProcessSnapshot {
internal::SystemSnapshotWin system_;
PointerVector<internal::ThreadSnapshotWin> threads_;
PointerVector<internal::ModuleSnapshotWin> modules_;
- // TODO(scottmg): scoped_ptr<internal::ExceptionSnapshotWin> exception_;
+ scoped_ptr<internal::ExceptionSnapshotWin> exception_;
ProcessReaderWin process_reader_;
UUID report_id_;
UUID client_id_;
« no previous file with comments | « snapshot/win/process_reader_win.cc ('k') | snapshot/win/process_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698