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

Side by Side Diff: src/common/mac/macho_reader.cc

Issue 1369233003: [mac] Teach dump_syms to handle additional zerofill sections (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698