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

Side by Side Diff: client/crashpad_info.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 unified diff | Download patch
« no previous file with comments | « client/crashpad_client_win.cc ('k') | client/crashpad_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 //! the Crashpad handler may choose not to forward all exceptions to the 92 //! the Crashpad handler may choose not to forward all exceptions to the
93 //! system’s crash reporter in cases where it has reason to believe that the 93 //! system’s crash reporter in cases where it has reason to believe that the
94 //! system’s crash reporter would not normally have handled the exception in 94 //! system’s crash reporter would not normally have handled the exception in
95 //! Crashpad’s absence. 95 //! Crashpad’s absence.
96 void set_system_crash_reporter_forwarding( 96 void set_system_crash_reporter_forwarding(
97 TriState system_crash_reporter_forwarding) { 97 TriState system_crash_reporter_forwarding) {
98 system_crash_reporter_forwarding_ = system_crash_reporter_forwarding; 98 system_crash_reporter_forwarding_ = system_crash_reporter_forwarding;
99 } 99 }
100 100
101 #if defined(OS_WIN) 101 #if defined(OS_WIN)
102 //! \brief Save an EXCEPTION_POINTERS record for the crash handler. 102 //! \brief Save the crashing thread ID for the crash handler.
103 void set_thread_id(DWORD thread_id) { thread_id_ = thread_id; }
104 DWORD thread_id() const { return thread_id_; }
105
106 //! \brief Save an `EXCEPTION_POINTERS` record for the crash handler.
103 void set_exception_pointers(EXCEPTION_POINTERS* exception_pointers) { 107 void set_exception_pointers(EXCEPTION_POINTERS* exception_pointers) {
104 exception_pointers_ = exception_pointers; 108 exception_pointers_ = exception_pointers;
105 } 109 }
110 EXCEPTION_POINTERS* exception_pointers() const { return exception_pointers_; }
106 #endif // OS_WIN 111 #endif // OS_WIN
107 112
108 enum : uint32_t { 113 enum : uint32_t {
109 kSignature = 'CPad', 114 kSignature = 'CPad',
110 }; 115 };
111 116
112 private: 117 private:
113 // The compiler won’t necessarily see anyone using these fields, but it 118 // The compiler won’t necessarily see anyone using these fields, but it
114 // shouldn’t warn about that. These fields aren’t intended for use by the 119 // shouldn’t warn about that. These fields aren’t intended for use by the
115 // process they’re found in, they’re supposed to be read by the crash 120 // process they’re found in, they’re supposed to be read by the crash
116 // reporting process. 121 // reporting process.
117 #if defined(__clang__) 122 #if defined(__clang__)
118 #pragma clang diagnostic push 123 #pragma clang diagnostic push
119 #pragma clang diagnostic ignored "-Wunused-private-field" 124 #pragma clang diagnostic ignored "-Wunused-private-field"
120 #endif 125 #endif
121 126
122 // Fields present in version 1: 127 // Fields present in version 1:
123 uint32_t signature_; // kSignature 128 uint32_t signature_; // kSignature
124 uint32_t size_; // The size of the entire CrashpadInfo structure. 129 uint32_t size_; // The size of the entire CrashpadInfo structure.
125 uint32_t version_; // kVersion 130 uint32_t version_; // kVersion
126 TriState crashpad_handler_behavior_; 131 TriState crashpad_handler_behavior_;
127 TriState system_crash_reporter_forwarding_; 132 TriState system_crash_reporter_forwarding_;
128 uint16_t padding_0_; 133 uint16_t padding_0_;
129 SimpleStringDictionary* simple_annotations_; // weak 134 SimpleStringDictionary* simple_annotations_; // weak
130 135
131 #if defined(OS_WIN) 136 #if defined(OS_WIN)
132 EXCEPTION_POINTERS* exception_pointers_; 137 EXCEPTION_POINTERS* exception_pointers_;
138 DWORD thread_id_;
133 #endif // OS_WIN 139 #endif // OS_WIN
134 140
135 #if defined(__clang__) 141 #if defined(__clang__)
136 #pragma clang diagnostic pop 142 #pragma clang diagnostic pop
137 #endif 143 #endif
138 144
139 DISALLOW_COPY_AND_ASSIGN(CrashpadInfo); 145 DISALLOW_COPY_AND_ASSIGN(CrashpadInfo);
140 }; 146 };
141 147
142 } // namespace crashpad 148 } // namespace crashpad
143 149
144 #endif // CRASHPAD_CLIENT_CRASHPAD_INFO_H_ 150 #endif // CRASHPAD_CLIENT_CRASHPAD_INFO_H_
OLDNEW
« no previous file with comments | « client/crashpad_client_win.cc ('k') | client/crashpad_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698