1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Made '_' refer to value of memory breakpoint instead of addr

This commit is contained in:
Brian Fiete 2019-12-05 06:49:23 -08:00
parent fe92cc27aa
commit d13d3ed3f8
3 changed files with 30 additions and 3 deletions

View file

@ -197,7 +197,7 @@ namespace IDE.ui
exprPre.Append("@C:");
else
exprPre.Append("@Beef:");
exprPost.AppendF(",_=({0}*)0x", addrVal);
exprPost.AppendF(",_=*({0}*)0x", addrVal);
mBreakpoint.mMemoryAddress.ToString(exprPost, "X", null);
exprPost.Append("L");
}

View file

@ -2705,6 +2705,21 @@ namespace IDE.ui
}
}
});
let configItem = menu.AddItem("Configure Breakpoint");
configItem.mOnMenuItemSelected.Add(new (evt) =>
{
for (int breakIdx < gApp.mDebugger.mBreakpointList.Count)
{
let breakpoint = gApp.mDebugger.mBreakpointList[breakIdx];
if (breakpoint.mMemoryAddress == watchEntry.mMemoryBreakpointAddr)
{
ConditionDialog dialog = new ConditionDialog();
dialog.Init(breakpoint);
dialog.PopupWindow(listView.mWidgetWindow);
}
}
});
}
if (watchEntry.mResultType == .Pointer)

View file

@ -3629,7 +3629,16 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
if (findName == "_")
{
if (mSubjectValue)
{
if (mSubjectValue.mSrcAddress != 0)
{
auto refreshVal = ReadTypedValue(mSubjectValue.mType, mSubjectValue.mSrcAddress, DbgAddrType_Target);
if (refreshVal)
mSubjectValue = refreshVal;
}
return mSubjectValue;
}
if (!mSubjectExpr.IsEmpty())
{
DwFormatInfo formatInfo;
@ -5795,7 +5804,10 @@ void DbgExprEvaluator::PerformBinaryOperation(ASTREF(BfExpression*)& leftExpress
{
if ((binaryOp != BfBinaryOp_Equality) && (binaryOp != BfBinaryOp_InEquality))
{
Fail("Invalid operation for objects", opToken);
if (resultType->IsPointer())
Fail("Invalid operation for pointers", opToken);
else
Fail("Invalid operation for objects", opToken);
return;
}