diff options
author | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-12-04 14:05:23 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-12-04 14:05:23 +0000 |
commit | d9d0a61f9706ccc3ae50a8425abcf13cb96bcdde (patch) | |
tree | 9973792ed3c204fe2ffa5f80845bc680e6b52d3c /src/common/mac | |
parent | Fix unused method warning. (diff) | |
download | breakpad-d9d0a61f9706ccc3ae50a8425abcf13cb96bcdde.tar.xz |
Do not read CFI section when not outputing CFI information.
This revert revision 1182 and fix setting the module load address
whether CFI information is needed or not.
R=mark@chromium.org
Review URL: https://breakpad.appspot.com/641002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1243 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/mac')
-rw-r--r-- | src/common/mac/dump_syms.mm | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/common/mac/dump_syms.mm b/src/common/mac/dump_syms.mm index 5c5e13c9..2e3a6a96 100644 --- a/src/common/mac/dump_syms.mm +++ b/src/common/mac/dump_syms.mm @@ -406,11 +406,13 @@ bool DumpSymbols::LoadCommandDumper::SegmentCommand(const Segment &segment) { if (segment.name == "__TEXT") { module_->SetLoadAddress(segment.vmaddr); - mach_o::SectionMap::const_iterator eh_frame = - section_map.find("__eh_frame"); - if (eh_frame != section_map.end()) { - // If there is a problem reading this, don't treat it as a fatal error. - dumper_.ReadCFI(module_, reader_, eh_frame->second, true); + if (symbol_data_ != NO_CFI) { + mach_o::SectionMap::const_iterator eh_frame = + section_map.find("__eh_frame"); + if (eh_frame != section_map.end()) { + // If there is a problem reading this, don't treat it as a fatal error. + dumper_.ReadCFI(module_, reader_, eh_frame->second, true); + } } return true; } @@ -422,11 +424,13 @@ bool DumpSymbols::LoadCommandDumper::SegmentCommand(const Segment &segment) { return false; } } - mach_o::SectionMap::const_iterator debug_frame - = section_map.find("__debug_frame"); - if (debug_frame != section_map.end()) { - // If there is a problem reading this, don't treat it as a fatal error. - dumper_.ReadCFI(module_, reader_, debug_frame->second, false); + if (symbol_data_ != NO_CFI) { + mach_o::SectionMap::const_iterator debug_frame + = section_map.find("__debug_frame"); + if (debug_frame != section_map.end()) { + // If there is a problem reading this, don't treat it as a fatal error. + dumper_.ReadCFI(module_, reader_, debug_frame->second, false); + } } } |