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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 ExceptionSnapshotMac::~ExceptionSnapshotMac() { | 39 ExceptionSnapshotMac::~ExceptionSnapshotMac() { |
40 } | 40 } |
41 | 41 |
42 bool ExceptionSnapshotMac::Initialize(ProcessReader* process_reader, | 42 bool ExceptionSnapshotMac::Initialize(ProcessReader* process_reader, |
43 thread_t exception_thread, | 43 thread_t exception_thread, |
44 exception_type_t exception, | 44 exception_type_t exception, |
45 const mach_exception_data_type_t* code, | 45 const mach_exception_data_type_t* code, |
46 mach_msg_type_number_t code_count, | 46 mach_msg_type_number_t code_count, |
47 thread_state_flavor_t flavor, | 47 thread_state_flavor_t flavor, |
48 const natural_t* state, | 48 ConstThreadState state, |
49 mach_msg_type_number_t state_count) { | 49 mach_msg_type_number_t state_count) { |
50 INITIALIZATION_STATE_SET_INITIALIZING(initialized_); | 50 INITIALIZATION_STATE_SET_INITIALIZING(initialized_); |
51 | 51 |
52 codes_.push_back(exception); | 52 codes_.push_back(exception); |
53 for (mach_msg_type_number_t code_index = 0; | 53 for (mach_msg_type_number_t code_index = 0; |
54 code_index < code_count; | 54 code_index < code_count; |
55 ++code_index) { | 55 ++code_index) { |
56 codes_.push_back(code[code_index]); | 56 codes_.push_back(code[code_index]); |
57 } | 57 } |
58 | 58 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 return exception_address_; | 166 return exception_address_; |
167 } | 167 } |
168 | 168 |
169 const std::vector<uint64_t>& ExceptionSnapshotMac::Codes() const { | 169 const std::vector<uint64_t>& ExceptionSnapshotMac::Codes() const { |
170 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 170 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
171 return codes_; | 171 return codes_; |
172 } | 172 } |
173 | 173 |
174 } // namespace internal | 174 } // namespace internal |
175 } // namespace crashpad | 175 } // namespace crashpad |
OLD | NEW |