Index: snapshot/win/exception_snapshot_win.h |
diff --git a/snapshot/mac/exception_snapshot_mac.h b/snapshot/win/exception_snapshot_win.h |
similarity index 57% |
copy from snapshot/mac/exception_snapshot_mac.h |
copy to snapshot/win/exception_snapshot_win.h |
index ea1161c3de5f272257cd724c096ae0e6c454f43e..57e7e12e3eecd33d48f0fa4219f79f4d5af90cb3 100644 |
--- a/snapshot/mac/exception_snapshot_mac.h |
+++ b/snapshot/win/exception_snapshot_win.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2014 The Crashpad Authors. All rights reserved. |
+// Copyright 2015 The Crashpad Authors. All rights reserved. |
// |
// Licensed under the Apache License, Version 2.0 (the "License"); |
// you may not use this file except in compliance with the License. |
@@ -12,53 +12,44 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#ifndef CRASHPAD_SNAPSHOT_MAC_EXCEPTION_SNAPSHOT_MAC_H_ |
-#define CRASHPAD_SNAPSHOT_MAC_EXCEPTION_SNAPSHOT_MAC_H_ |
+#ifndef CRASHPAD_SNAPSHOT_WIN_EXCEPTION_SNAPSHOT_WIN_H_ |
+#define CRASHPAD_SNAPSHOT_WIN_EXCEPTION_SNAPSHOT_WIN_H_ |
-#include <mach/mach.h> |
#include <stdint.h> |
- |
-#include <vector> |
+#include <windows.h> |
#include "base/basictypes.h" |
#include "build/build_config.h" |
#include "snapshot/cpu_context.h" |
#include "snapshot/exception_snapshot.h" |
-#include "util/mach/mach_extensions.h" |
#include "util/misc/initialization_state_dcheck.h" |
+#include "util/win/address_types.h" |
namespace crashpad { |
-class ProcessReader; |
+class ProcessReaderWin; |
namespace internal { |
-//! \brief An ExceptionSnapshot of an exception sustained by a running (or |
-//! crashed) process on a Mac OS X system. |
-class ExceptionSnapshotMac final : public ExceptionSnapshot { |
+class ExceptionSnapshotWin final : public ExceptionSnapshot { |
public: |
- ExceptionSnapshotMac(); |
- ~ExceptionSnapshotMac() override; |
+ ExceptionSnapshotWin(); |
+ ~ExceptionSnapshotWin() override; |
//! \brief Initializes the object. |
//! |
- //! Other than \a process_reader, the parameters may be passed directly |
- //! through from a Mach exception handler. |
- //! |
//! \param[in] process_reader A ProcessReader for the task that sustained the |
Mark Mentovai
2015/08/18 16:17:19
Is “task” the right nomenclature on Windows?
scottmg
2015/08/18 16:56:00
Done.
|
//! exception. |
+ //! \param[in] thread_id The thread id in which the exception occurred. |
Mark Mentovai
2015/08/18 16:17:20
Nits: ID here, `EXCEPTION_POINTERS` on the next li
scottmg
2015/08/18 16:56:00
Done.
|
+ //! \param[in] exception_pointers_address The address of an EXCEPTION_POINTERS |
+ //! record in the target process, passed through from the exception |
+ //! handler. |
//! |
//! \return `true` if the snapshot could be created, `false` otherwise with |
//! an appropriate message logged. |
- bool Initialize(ProcessReader* process_reader, |
- exception_behavior_t behavior, |
- thread_t exception_thread, |
- exception_type_t exception, |
- const mach_exception_data_type_t* code, |
- mach_msg_type_number_t code_count, |
- thread_state_flavor_t flavor, |
- ConstThreadState state, |
- mach_msg_type_number_t state_count); |
+ bool Initialize(ProcessReaderWin* process_reader, |
+ DWORD thread_id, |
+ WinVMAddress exception_pointers); |
// ExceptionSnapshot: |
@@ -80,14 +71,14 @@ class ExceptionSnapshotMac final : public ExceptionSnapshot { |
std::vector<uint64_t> codes_; |
uint64_t thread_id_; |
uint64_t exception_address_; |
- exception_type_t exception_; |
- uint32_t exception_code_0_; |
+ uint32_t exception_flags_; |
+ DWORD exception_code_; |
InitializationStateDcheck initialized_; |
- DISALLOW_COPY_AND_ASSIGN(ExceptionSnapshotMac); |
+ DISALLOW_COPY_AND_ASSIGN(ExceptionSnapshotWin); |
}; |
} // namespace internal |
} // namespace crashpad |
-#endif // CRASHPAD_SNAPSHOT_MAC_EXCEPTION_SNAPSHOT_MAC_H_ |
+#endif // CRASHPAD_SNAPSHOT_WIN_EXCEPTION_SNAPSHOT_WIN_H_ |