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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 return 16; | 123 return 16; |
124 } | 124 } |
125 | 125 |
126 size_t MinidumpMemoryWriter::SizeOfObject() { | 126 size_t MinidumpMemoryWriter::SizeOfObject() { |
127 DCHECK_GE(state(), kStateFrozen); | 127 DCHECK_GE(state(), kStateFrozen); |
128 | 128 |
129 return MemoryRangeSize(); | 129 return MemoryRangeSize(); |
130 } | 130 } |
131 | 131 |
132 bool MinidumpMemoryWriter::WillWriteAtOffsetImpl(off_t offset) { | 132 bool MinidumpMemoryWriter::WillWriteAtOffsetImpl(FileOffset offset) { |
133 DCHECK_EQ(state(), kStateFrozen); | 133 DCHECK_EQ(state(), kStateFrozen); |
134 | 134 |
135 // There will always be at least one registered descriptor, the one for this | 135 // There will always be at least one registered descriptor, the one for this |
136 // object’s own memory_descriptor_ field. | 136 // object’s own memory_descriptor_ field. |
137 DCHECK_GE(registered_memory_descriptors_.size(), 1u); | 137 DCHECK_GE(registered_memory_descriptors_.size(), 1u); |
138 | 138 |
139 uint64_t base_address = MemoryRangeBaseAddress(); | 139 uint64_t base_address = MemoryRangeBaseAddress(); |
140 decltype(registered_memory_descriptors_[0]->StartOfMemoryRange) local_address; | 140 decltype(registered_memory_descriptors_[0]->StartOfMemoryRange) local_address; |
141 if (!AssignIfInRange(&local_address, base_address)) { | 141 if (!AssignIfInRange(&local_address, base_address)) { |
142 LOG(ERROR) << "base_address " << base_address << " out of range"; | 142 LOG(ERROR) << "base_address " << base_address << " out of range"; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 } | 251 } |
252 | 252 |
253 return file_writer->WriteIoVec(&iovecs); | 253 return file_writer->WriteIoVec(&iovecs); |
254 } | 254 } |
255 | 255 |
256 MinidumpStreamType MinidumpMemoryListWriter::StreamType() const { | 256 MinidumpStreamType MinidumpMemoryListWriter::StreamType() const { |
257 return kMinidumpStreamTypeMemoryList; | 257 return kMinidumpStreamTypeMemoryList; |
258 } | 258 } |
259 | 259 |
260 } // namespace crashpad | 260 } // namespace crashpad |
OLD | NEW |