| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "snapshot/mac/exception_snapshot_mac.h" | 31 #include "snapshot/mac/exception_snapshot_mac.h" |
| 32 #include "snapshot/mac/module_snapshot_mac.h" | 32 #include "snapshot/mac/module_snapshot_mac.h" |
| 33 #include "snapshot/mac/process_reader.h" | 33 #include "snapshot/mac/process_reader.h" |
| 34 #include "snapshot/mac/system_snapshot_mac.h" | 34 #include "snapshot/mac/system_snapshot_mac.h" |
| 35 #include "snapshot/mac/thread_snapshot_mac.h" | 35 #include "snapshot/mac/thread_snapshot_mac.h" |
| 36 #include "snapshot/memory_map_region_snapshot.h" | 36 #include "snapshot/memory_map_region_snapshot.h" |
| 37 #include "snapshot/module_snapshot.h" | 37 #include "snapshot/module_snapshot.h" |
| 38 #include "snapshot/process_snapshot.h" | 38 #include "snapshot/process_snapshot.h" |
| 39 #include "snapshot/system_snapshot.h" | 39 #include "snapshot/system_snapshot.h" |
| 40 #include "snapshot/thread_snapshot.h" | 40 #include "snapshot/thread_snapshot.h" |
| 41 #include "snapshot/unloaded_module_snapshot.h" |
| 41 #include "util/mach/mach_extensions.h" | 42 #include "util/mach/mach_extensions.h" |
| 42 #include "util/misc/initialization_state_dcheck.h" | 43 #include "util/misc/initialization_state_dcheck.h" |
| 43 #include "util/misc/uuid.h" | 44 #include "util/misc/uuid.h" |
| 44 #include "util/stdlib/pointer_container.h" | 45 #include "util/stdlib/pointer_container.h" |
| 45 | 46 |
| 46 namespace crashpad { | 47 namespace crashpad { |
| 47 | 48 |
| 48 //! \brief A ProcessSnapshot of a running (or crashed) process running on a Mac | 49 //! \brief A ProcessSnapshot of a running (or crashed) process running on a Mac |
| 49 //! OS X system. | 50 //! OS X system. |
| 50 class ProcessSnapshotMac final : public ProcessSnapshot { | 51 class ProcessSnapshotMac final : public ProcessSnapshot { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void SnapshotTime(timeval* snapshot_time) const override; | 120 void SnapshotTime(timeval* snapshot_time) const override; |
| 120 void ProcessStartTime(timeval* start_time) const override; | 121 void ProcessStartTime(timeval* start_time) const override; |
| 121 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override; | 122 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override; |
| 122 void ReportID(UUID* report_id) const override; | 123 void ReportID(UUID* report_id) const override; |
| 123 void ClientID(UUID* client_id) const override; | 124 void ClientID(UUID* client_id) const override; |
| 124 const std::map<std::string, std::string>& AnnotationsSimpleMap() | 125 const std::map<std::string, std::string>& AnnotationsSimpleMap() |
| 125 const override; | 126 const override; |
| 126 const SystemSnapshot* System() const override; | 127 const SystemSnapshot* System() const override; |
| 127 std::vector<const ThreadSnapshot*> Threads() const override; | 128 std::vector<const ThreadSnapshot*> Threads() const override; |
| 128 std::vector<const ModuleSnapshot*> Modules() const override; | 129 std::vector<const ModuleSnapshot*> Modules() const override; |
| 130 std::vector<UnloadedModuleSnapshot> UnloadedModules() const override; |
| 129 const ExceptionSnapshot* Exception() const override; | 131 const ExceptionSnapshot* Exception() const override; |
| 130 std::vector<const MemoryMapRegionSnapshot*> MemoryMap() const override; | 132 std::vector<const MemoryMapRegionSnapshot*> MemoryMap() const override; |
| 131 std::vector<HandleSnapshot> Handles() const override; | 133 std::vector<HandleSnapshot> Handles() const override; |
| 132 std::vector<const MemorySnapshot*> ExtraMemory() const override; | 134 std::vector<const MemorySnapshot*> ExtraMemory() const override; |
| 133 | 135 |
| 134 private: | 136 private: |
| 135 // Initializes threads_ on behalf of Initialize(). | 137 // Initializes threads_ on behalf of Initialize(). |
| 136 void InitializeThreads(); | 138 void InitializeThreads(); |
| 137 | 139 |
| 138 // Initializes modules_ on behalf of Initialize(). | 140 // Initializes modules_ on behalf of Initialize(). |
| 139 void InitializeModules(); | 141 void InitializeModules(); |
| 140 | 142 |
| 141 internal::SystemSnapshotMac system_; | 143 internal::SystemSnapshotMac system_; |
| 142 PointerVector<internal::ThreadSnapshotMac> threads_; | 144 PointerVector<internal::ThreadSnapshotMac> threads_; |
| 143 PointerVector<internal::ModuleSnapshotMac> modules_; | 145 PointerVector<internal::ModuleSnapshotMac> modules_; |
| 144 scoped_ptr<internal::ExceptionSnapshotMac> exception_; | 146 scoped_ptr<internal::ExceptionSnapshotMac> exception_; |
| 145 ProcessReader process_reader_; | 147 ProcessReader process_reader_; |
| 146 UUID report_id_; | 148 UUID report_id_; |
| 147 UUID client_id_; | 149 UUID client_id_; |
| 148 std::map<std::string, std::string> annotations_simple_map_; | 150 std::map<std::string, std::string> annotations_simple_map_; |
| 149 timeval snapshot_time_; | 151 timeval snapshot_time_; |
| 150 InitializationStateDcheck initialized_; | 152 InitializationStateDcheck initialized_; |
| 151 | 153 |
| 152 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac); | 154 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac); |
| 153 }; | 155 }; |
| 154 | 156 |
| 155 } // namespace crashpad | 157 } // namespace crashpad |
| 156 | 158 |
| 157 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_ | 159 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_ |
| OLD | NEW |