git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39704 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-12-02 16:09:12 +00:00
parent f07f493d26
commit 9119091a71

View File

@ -619,8 +619,8 @@ DwarfFile::UnwindCallFrame(CompilationUnit* unit,
if (location >= initialLocation
&& location < initialLocation + addressRange) {
// This is the FDE we're looking for.
off_t remaining = (off_t)length
- (dataReader.Offset() - lengthOffset);
off_t remaining = lengthOffset + length
- dataReader.Offset();
if (remaining < 0)
return B_BAD_DATA;
@ -666,14 +666,16 @@ DwarfFile::UnwindCallFrame(CompilationUnit* unit,
// read the FDE augmentation data (if any)
FDEAugmentation fdeAugmentation;
off_t fdeOffset = dataReader.Offset();
error = cieAugmentation.ReadFDEData(dataReader,
fdeAugmentation);
if (error != B_OK) {
TRACE_CFI(" failed to read FDE augmentation data!\n");
return error;
}
remaining -= dataReader.Offset() - fdeOffset;
// adjust remaining byte count to take augmentation bytes
// (if any) into account.
remaining = lengthOffset + length
- dataReader.Offset();
error = context.SaveInitialRuleSet();
if (error != B_OK)