Accept version 3 .eh_frame unwinding data, as well as version 1.

a=michaelrmmiller
r=jimblandy


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@947 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jimblandy 2012-04-03 23:12:34 +00:00
parent a9d27c5ea0
commit c6485cb937

View File

@ -1857,20 +1857,14 @@ bool CallFrameInfo::ReadCIEFields(CIE *cie) {
cie->version = reader_->ReadOneByte(cursor); cie->version = reader_->ReadOneByte(cursor);
cursor++; cursor++;
// If we don't recognize the version, we can't parse any more fields // If we don't recognize the version, we can't parse any more fields of the
// of the CIE. For DWARF CFI, we handle versions 1 through 3 (there // CIE. For DWARF CFI, we handle versions 1 through 3 (there was never a
// was never a version 2 of CFI data). For .eh_frame, we handle only // version 2 of CFI data). For .eh_frame, we handle versions 1 and 3 as well;
// version 1. // the difference between those versions seems to be the same as for
if (eh_frame_) { // .debug_frame.
if (cie->version != 1) { if (cie->version < 1 || cie->version > 3) {
reporter_->UnrecognizedVersion(cie->offset, cie->version); reporter_->UnrecognizedVersion(cie->offset, cie->version);
return false; return false;
}
} else {
if (cie->version < 1 || cie->version > 3) {
reporter_->UnrecognizedVersion(cie->offset, cie->version);
return false;
}
} }
const char *augmentation_start = cursor; const char *augmentation_start = cursor;