Chromium Code Reviews| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 | 321 |
| 322 return segment->GetSectionByName(section_name, address); | 322 return segment->GetSectionByName(section_name, address); |
| 323 } | 323 } |
| 324 | 324 |
| 325 const process_types::section* MachOImageReader::GetSectionAtIndex( | 325 const process_types::section* MachOImageReader::GetSectionAtIndex( |
| 326 size_t index, | 326 size_t index, |
| 327 const MachOImageSegmentReader** containing_segment, | 327 const MachOImageSegmentReader** containing_segment, |
| 328 mach_vm_address_t* address) const { | 328 mach_vm_address_t* address) const { |
| 329 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 329 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
| 330 | 330 |
| 331 COMPILE_ASSERT(NO_SECT == 0, no_sect_must_be_zero); | 331 static_assert(NO_SECT == 0, "no sect must be zero"); |
|
Mark Mentovai
2014/10/01 03:55:12
"NO_SECT must be 0"
scottmg
2014/10/01 16:37:19
Done.
| |
| 332 if (index == NO_SECT) { | 332 if (index == NO_SECT) { |
| 333 LOG(WARNING) << "section index " << index << " out of range"; | 333 LOG(WARNING) << "section index " << index << " out of range"; |
| 334 return NULL; | 334 return NULL; |
| 335 } | 335 } |
| 336 | 336 |
| 337 // Switch to a more comfortable 0-based index. | 337 // Switch to a more comfortable 0-based index. |
| 338 size_t local_index = index - 1; | 338 size_t local_index = index - 1; |
| 339 | 339 |
| 340 for (const MachOImageSegmentReader* segment : segments_) { | 340 for (const MachOImageSegmentReader* segment : segments_) { |
| 341 size_t nsects = segment->nsects(); | 341 size_t nsects = segment->nsects(); |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 662 linkedit_segment, | 662 linkedit_segment, |
| 663 module_info_)) { | 663 module_info_)) { |
| 664 symbol_table_.reset(); | 664 symbol_table_.reset(); |
| 665 return; | 665 return; |
| 666 } | 666 } |
| 667 | 667 |
| 668 symbol_table_initialized_.set_valid(); | 668 symbol_table_initialized_.set_valid(); |
| 669 } | 669 } |
| 670 | 670 |
| 671 } // namespace crashpad | 671 } // namespace crashpad |
| OLD | NEW |