OLD | NEW |
---|---|
1 // Copyright (c) 2010, Google Inc. | 1 // Copyright (c) 2010, Google Inc. |
Mark Mentovai
2015/09/28 17:59:20
In the CL description:
https://www.google.com/#q=
Mark Mentovai
2015/09/29 12:55:12
Mark Mentovai - August is over wrote:
| |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
11 // copyright notice, this list of conditions and the following disclaimer | 11 // copyright notice, this list of conditions and the following disclaimer |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
474 >> dummy32 | 474 >> dummy32 |
475 >> section.flags | 475 >> section.flags |
476 >> dummy32 | 476 >> dummy32 |
477 >> dummy32; | 477 >> dummy32; |
478 if (section.bits_64) | 478 if (section.bits_64) |
479 cursor >> dummy32; | 479 cursor >> dummy32; |
480 if (!cursor) { | 480 if (!cursor) { |
481 reporter_->SectionsMissing(segment.name); | 481 reporter_->SectionsMissing(segment.name); |
482 return false; | 482 return false; |
483 } | 483 } |
484 if ((section.flags & SECTION_TYPE) == S_ZEROFILL) { | 484 if ((section.flags & SECTION_TYPE) == S_ZEROFILL || (section.flags & SECTION _TYPE) == S_THREAD_LOCAL_ZEROFILL) { |
Mark Mentovai
2015/09/28 17:59:20
Don’t go past 80 columns. Break the line after the
| |
485 // Zero-fill sections have a size, but no contents. | 485 // Zero-fill sections have a size, but no contents. |
486 section.contents.start = section.contents.end = NULL; | 486 section.contents.start = section.contents.end = NULL; |
487 } else if (segment.contents.start == NULL && | 487 } else if (segment.contents.start == NULL && |
488 segment.contents.end == NULL) { | 488 segment.contents.end == NULL) { |
489 // Mach-O files in .dSYM bundles have the contents of the loaded | 489 // Mach-O files in .dSYM bundles have the contents of the loaded |
490 // segments removed, and their file offsets and file sizes zeroed | 490 // segments removed, and their file offsets and file sizes zeroed |
491 // out. However, the sections within those segments still have | 491 // out. However, the sections within those segments still have |
492 // non-zero sizes. There's no reason to call MisplacedSectionData in | 492 // non-zero sizes. There's no reason to call MisplacedSectionData in |
493 // this case; the caller may just need the section's load | 493 // this case; the caller may just need the section's load |
494 // address. But do set the contents' limits to NULL, for safety. | 494 // address. But do set the contents' limits to NULL, for safety. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
528 | 528 |
529 bool Reader::MapSegmentSections(const Segment &segment, | 529 bool Reader::MapSegmentSections(const Segment &segment, |
530 SectionMap *section_map) const { | 530 SectionMap *section_map) const { |
531 section_map->clear(); | 531 section_map->clear(); |
532 SectionMapper mapper(section_map); | 532 SectionMapper mapper(section_map); |
533 return WalkSegmentSections(segment, &mapper); | 533 return WalkSegmentSections(segment, &mapper); |
534 } | 534 } |
535 | 535 |
536 } // namespace mach_o | 536 } // namespace mach_o |
537 } // namespace google_breakpad | 537 } // namespace google_breakpad |
OLD | NEW |