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

Side by Side Diff: third_party/crashpad/crashpad/snapshot/mac/process_snapshot_mac.h

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years 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 unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
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 "snapshot/unloaded_module_snapshot.h"
42 #include "util/mach/mach_extensions.h" 42 #include "util/mach/mach_extensions.h"
43 #include "util/misc/initialization_state_dcheck.h" 43 #include "util/misc/initialization_state_dcheck.h"
44 #include "util/misc/uuid.h" 44 #include "util/misc/uuid.h"
45 #include "util/stdlib/pointer_container.h" 45 #include "util/stdlib/pointer_container.h"
46 46
47 namespace crashpad { 47 namespace crashpad {
48 48
49 //! \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
50 //! OS X system. 50 //! macOS system.
51 class ProcessSnapshotMac final : public ProcessSnapshot { 51 class ProcessSnapshotMac final : public ProcessSnapshot {
52 public: 52 public:
53 ProcessSnapshotMac(); 53 ProcessSnapshotMac();
54 ~ProcessSnapshotMac() override; 54 ~ProcessSnapshotMac() override;
55 55
56 //! \brief Initializes the object. 56 //! \brief Initializes the object.
57 //! 57 //!
58 //! \param[in] task The task to create a snapshot from. 58 //! \param[in] task The task to create a snapshot from.
59 //! 59 //!
60 //! \return `true` if the snapshot could be created, `false` otherwise with 60 //! \return `true` if the snapshot could be created, `false` otherwise with
(...skipping 15 matching lines...) Expand all
76 thread_t exception_thread, 76 thread_t exception_thread,
77 exception_type_t exception, 77 exception_type_t exception,
78 const mach_exception_data_type_t* code, 78 const mach_exception_data_type_t* code,
79 mach_msg_type_number_t code_count, 79 mach_msg_type_number_t code_count,
80 thread_state_flavor_t flavor, 80 thread_state_flavor_t flavor,
81 ConstThreadState state, 81 ConstThreadState state,
82 mach_msg_type_number_t state_count); 82 mach_msg_type_number_t state_count);
83 83
84 //! \brief Sets the value to be returned by ReportID(). 84 //! \brief Sets the value to be returned by ReportID().
85 //! 85 //!
86 //! On Mac OS X, the crash report ID is under the control of the snapshot 86 //! On macOS, the crash report ID is under the control of the snapshot
87 //! producer, which may call this method to set the report ID. If this is not 87 //! producer, which may call this method to set the report ID. If this is not
88 //! done, ReportID() will return an identifier consisting entirely of zeroes. 88 //! done, ReportID() will return an identifier consisting entirely of zeroes.
89 void SetReportID(const UUID& report_id) { report_id_ = report_id; } 89 void SetReportID(const UUID& report_id) { report_id_ = report_id; }
90 90
91 //! \brief Sets the value to be returned by ClientID(). 91 //! \brief Sets the value to be returned by ClientID().
92 //! 92 //!
93 //! On Mac OS X, the client ID is under the control of the snapshot producer, 93 //! On macOS, the client ID is under the control of the snapshot producer,
94 //! which may call this method to set the client ID. If this is not done, 94 //! which may call this method to set the client ID. If this is not done,
95 //! ClientID() will return an identifier consisting entirely of zeroes. 95 //! ClientID() will return an identifier consisting entirely of zeroes.
96 void SetClientID(const UUID& client_id) { client_id_ = client_id; } 96 void SetClientID(const UUID& client_id) { client_id_ = client_id; }
97 97
98 //! \brief Sets the value to be returned by AnnotationsSimpleMap(). 98 //! \brief Sets the value to be returned by AnnotationsSimpleMap().
99 //! 99 //!
100 //! On Mac OS X, all process annotations are under the control of the snapshot 100 //! On macOS, all process annotations are under the control of the snapshot
101 //! producer, which may call this method to establish these annotations. 101 //! producer, which may call this method to establish these annotations.
102 //! Contrast this with module annotations, which are under the control of the 102 //! Contrast this with module annotations, which are under the control of the
103 //! process being snapshotted. 103 //! process being snapshotted.
104 void SetAnnotationsSimpleMap( 104 void SetAnnotationsSimpleMap(
105 const std::map<std::string, std::string>& annotations_simple_map) { 105 const std::map<std::string, std::string>& annotations_simple_map) {
106 annotations_simple_map_ = annotations_simple_map; 106 annotations_simple_map_ = annotations_simple_map;
107 } 107 }
108 108
109 //! \brief Returns options from CrashpadInfo structures found in modules in 109 //! \brief Returns options from CrashpadInfo structures found in modules in
110 //! the process. 110 //! the process.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 std::map<std::string, std::string> annotations_simple_map_; 150 std::map<std::string, std::string> annotations_simple_map_;
151 timeval snapshot_time_; 151 timeval snapshot_time_;
152 InitializationStateDcheck initialized_; 152 InitializationStateDcheck initialized_;
153 153
154 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac); 154 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac);
155 }; 155 };
156 156
157 } // namespace crashpad 157 } // namespace crashpad
158 158
159 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_ 159 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698