* 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
This commit is contained in:
Ingo Weinhold
2009-07-21 16:15:39 +00:00
parent c90f9b9ef3
commit 8536312038
+5 -2
View File
@@ -80,7 +80,7 @@ public:
// get the subprogram's frame base location // get the subprogram's frame base location
const LocationDescription* location = fSubprogramEntry->FrameBase(); const LocationDescription* location = fSubprogramEntry->FrameBase();
if (!location->IsValid()) if (!location->IsValid())
return B_BAD_VALUE; return false;
// get the expression // get the expression
const void* expression; const void* expression;
@@ -88,7 +88,7 @@ public:
status_t error = fFile->_GetLocationExpression(fUnit, location, status_t error = fFile->_GetLocationExpression(fUnit, location,
fInstructionPointer, expression, expressionLength); fInstructionPointer, expression, expressionLength);
if (error != B_OK) if (error != B_OK)
return error; return false;
// evaluate the expression // evaluate the expression
DwarfExpressionEvaluator evaluator(this); DwarfExpressionEvaluator evaluator(this);
@@ -1757,6 +1757,9 @@ DwarfFile::_FindLocationExpression(CompilationUnit* unit, uint64 offset,
if (start == end) if (start == end)
continue; continue;
start += baseAddress;
end += baseAddress;
if (address >= start && address < end) { if (address >= start && address < end) {
_expression = expression; _expression = expression;
_length = expressionLength; _length = expressionLength;