diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index a4b8ab206f..f0b6ffb6a4 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -80,7 +80,7 @@ public: // get the subprogram's frame base location const LocationDescription* location = fSubprogramEntry->FrameBase(); if (!location->IsValid()) - return B_BAD_VALUE; + return false; // get the expression const void* expression; @@ -88,7 +88,7 @@ public: status_t error = fFile->_GetLocationExpression(fUnit, location, fInstructionPointer, expression, expressionLength); if (error != B_OK) - return error; + return false; // evaluate the expression DwarfExpressionEvaluator evaluator(this); @@ -1757,6 +1757,9 @@ DwarfFile::_FindLocationExpression(CompilationUnit* unit, uint64 offset, if (start == end) continue; + start += baseAddress; + end += baseAddress; + if (address >= start && address < end) { _expression = expression; _length = expressionLength;