From 8536312038bdfbf44510c8f3713741b675b7c3ef Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 21 Jul 2009 16:15:39 +0000 Subject: [PATCH] * ExpressionEvaluationContext::GetFrameBaseAddress(): Fixed incorrect error return values (bool vs. status_t). * _FindLocationExpression(): The base address was completely ignored, thus if one was needed, the correct location expression wouldn't be found. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31675 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/dwarf/DwarfFile.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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;