| Index: snapshot/win/thread_snapshot_win.h
|
| diff --git a/snapshot/mac/thread_snapshot_mac.h b/snapshot/win/thread_snapshot_win.h
|
| similarity index 58%
|
| copy from snapshot/mac/thread_snapshot_mac.h
|
| copy to snapshot/win/thread_snapshot_win.h
|
| index a59678cc0063bf507e5e90e0f9c7e51115cbe60a..19e8066c22c801283bf3ef88b51993e0198c2b65 100644
|
| --- a/snapshot/mac/thread_snapshot_mac.h
|
| +++ b/snapshot/win/thread_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,44 +12,43 @@
|
| // See the License for the specific language governing permissions and
|
| // limitations under the License.
|
|
|
| -#ifndef CRASHPAD_SNAPSHOT_MAC_THREAD_SNAPSHOT_MAC_H_
|
| -#define CRASHPAD_SNAPSHOT_MAC_THREAD_SNAPSHOT_MAC_H_
|
| +#ifndef CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_
|
| +#define CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_
|
|
|
| -#include <mach/mach.h>
|
| #include <stdint.h>
|
|
|
| #include "base/basictypes.h"
|
| -#include "build/build_config.h"
|
| #include "snapshot/cpu_context.h"
|
| -#include "snapshot/mac/memory_snapshot_mac.h"
|
| #include "snapshot/memory_snapshot.h"
|
| #include "snapshot/thread_snapshot.h"
|
| +#include "snapshot/win/memory_snapshot_win.h"
|
| +#include "snapshot/win/process_reader_win.h"
|
| #include "util/misc/initialization_state_dcheck.h"
|
|
|
| namespace crashpad {
|
|
|
| -class ProcessReader;
|
| +class ProcessReaderWin;
|
|
|
| namespace internal {
|
|
|
| //! \brief A ThreadSnapshot of a thread in a running (or crashed) process on a
|
| -//! Mac OS X system.
|
| -class ThreadSnapshotMac final : public ThreadSnapshot {
|
| +//! Windows system.
|
| +class ThreadSnapshotWin final : public ThreadSnapshot {
|
| public:
|
| - ThreadSnapshotMac();
|
| - ~ThreadSnapshotMac() override;
|
| + ThreadSnapshotWin();
|
| + ~ThreadSnapshotWin() override;
|
|
|
| //! \brief Initializes the object.
|
| //!
|
| - //! \param[in] process_reader A ProcessReader for the task containing the
|
| - //! thread.
|
| - //! \param[in] process_reader_thread The thread within the ProcessReader for
|
| - //! which the snapshot should be created.
|
| + //! \param[in] process_reader A ProcessReaderWin for the process containing
|
| + //! the thread.
|
| + //! \param[in] process_reader_thread The thread within the ProcessReaderWin
|
| + //! for which the snapshot should be created.
|
| //!
|
| //! \return `true` if the snapshot could be created, `false` otherwise with
|
| //! an appropriate message logged.
|
| - bool Initialize(ProcessReader* process_reader,
|
| - const ProcessReader::Thread& process_reader_thread);
|
| + bool Initialize(ProcessReaderWin* process_reader,
|
| + const ProcessReaderWin::Thread& process_reader_thread);
|
|
|
| // ThreadSnapshot:
|
|
|
| @@ -61,25 +60,15 @@ class ThreadSnapshotMac final : public ThreadSnapshot {
|
| uint64_t ThreadSpecificDataAddress() const override;
|
|
|
| private:
|
| -#if defined(ARCH_CPU_X86_FAMILY)
|
| - union {
|
| - CPUContextX86 x86;
|
| - CPUContextX86_64 x86_64;
|
| - } context_union_;
|
| -#endif
|
| CPUContext context_;
|
| - MemorySnapshotMac stack_;
|
| - uint64_t thread_id_;
|
| - uint64_t thread_specific_data_address_;
|
| - thread_t thread_;
|
| - int suspend_count_;
|
| - int priority_;
|
| + MemorySnapshotWin stack_;
|
| + ProcessReaderWin::Thread thread_;
|
| InitializationStateDcheck initialized_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ThreadSnapshotMac);
|
| + DISALLOW_COPY_AND_ASSIGN(ThreadSnapshotWin);
|
| };
|
|
|
| } // namespace internal
|
| } // namespace crashpad
|
|
|
| -#endif // CRASHPAD_SNAPSHOT_MAC_THREAD_SNAPSHOT_MAC_H_
|
| +#endif // CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_
|
|
|