mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Handle Break When Value Changes with watches prefixed with @Beef: or @C:
This commit is contained in:
parent
d76cc1ebc9
commit
d7bf451c9f
2 changed files with 35 additions and 10 deletions
|
@ -3324,6 +3324,8 @@ namespace IDE.ui
|
||||||
CompactChildExpression(listViewItem, evalStr);
|
CompactChildExpression(listViewItem, evalStr);
|
||||||
|
|
||||||
int valStart = 0;
|
int valStart = 0;
|
||||||
|
if ((evalStr.StartsWith("@Beef:")) || (evalStr.StartsWith("@C:")))
|
||||||
|
valStart = evalStr.IndexOf(':') + 1;
|
||||||
if (evalStr.StartsWith('{'))
|
if (evalStr.StartsWith('{'))
|
||||||
{
|
{
|
||||||
int endPos = evalStr.IndexOf('}');
|
int endPos = evalStr.IndexOf('}');
|
||||||
|
@ -3335,6 +3337,7 @@ namespace IDE.ui
|
||||||
evalStr.Remove(valStart, 1);
|
evalStr.Remove(valStart, 1);
|
||||||
else
|
else
|
||||||
evalStr.Insert(valStart, "&");
|
evalStr.Insert(valStart, "&");
|
||||||
|
|
||||||
gApp.mBreakpointPanel.CreateMemoryBreakpoint(evalStr);
|
gApp.mBreakpointPanel.CreateMemoryBreakpoint(evalStr);
|
||||||
gApp.MarkDirty();
|
gApp.MarkDirty();
|
||||||
});
|
});
|
||||||
|
|
|
@ -10672,6 +10672,38 @@ String WinDebugger::CompactChildExpression(const StringImpl& expr, const StringI
|
||||||
if (compileUnit != NULL)
|
if (compileUnit != NULL)
|
||||||
language = compileUnit->mLanguage;
|
language = compileUnit->mLanguage;
|
||||||
|
|
||||||
|
auto terminatedParentExpr = parentExpr + ";";
|
||||||
|
|
||||||
|
String parentPrefix;
|
||||||
|
|
||||||
|
int colonIdx = terminatedParentExpr.IndexOf(':');
|
||||||
|
if (colonIdx > 0)
|
||||||
|
{
|
||||||
|
bool isValid = true;
|
||||||
|
String lang = terminatedParentExpr.Substring(1, colonIdx - 1);
|
||||||
|
lang = ToUpper(lang);
|
||||||
|
if ((lang == "") || (lang == "BEEF"))
|
||||||
|
{
|
||||||
|
language = DbgLanguage_Beef;
|
||||||
|
}
|
||||||
|
else if (lang == "C")
|
||||||
|
{
|
||||||
|
language = DbgLanguage_C;
|
||||||
|
}
|
||||||
|
if (language != DbgLanguage_Unknown)
|
||||||
|
{
|
||||||
|
parentPrefix += terminatedParentExpr.Substring(0, colonIdx + 1);
|
||||||
|
terminatedParentExpr.Remove(0, colonIdx + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (terminatedParentExpr.StartsWith('{'))
|
||||||
|
{
|
||||||
|
int prefixEnd = terminatedParentExpr.IndexOf('}');
|
||||||
|
parentPrefix += terminatedParentExpr.Substring(0, prefixEnd + 1);
|
||||||
|
terminatedParentExpr.Remove(0, prefixEnd + 1);
|
||||||
|
}
|
||||||
|
|
||||||
BfPassInstance bfPassInstance(mBfSystem);
|
BfPassInstance bfPassInstance(mBfSystem);
|
||||||
|
|
||||||
BfParser parser(mBfSystem);
|
BfParser parser(mBfSystem);
|
||||||
|
@ -10680,16 +10712,6 @@ String WinDebugger::CompactChildExpression(const StringImpl& expr, const StringI
|
||||||
parser.SetSource(terminatedExpr.c_str(), terminatedExpr.length());
|
parser.SetSource(terminatedExpr.c_str(), terminatedExpr.length());
|
||||||
parser.Parse(&bfPassInstance);
|
parser.Parse(&bfPassInstance);
|
||||||
|
|
||||||
auto terminatedParentExpr = parentExpr + ";";
|
|
||||||
|
|
||||||
String parentPrefix;
|
|
||||||
if (terminatedParentExpr.StartsWith('{'))
|
|
||||||
{
|
|
||||||
int prefixEnd = terminatedParentExpr.IndexOf('}');
|
|
||||||
parentPrefix = terminatedParentExpr.Substring(0, prefixEnd + 1);
|
|
||||||
terminatedParentExpr.Remove(0, prefixEnd + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
BfParser parentParser(mBfSystem);
|
BfParser parentParser(mBfSystem);
|
||||||
parentParser.mCompatMode = language != DbgLanguage_Beef;
|
parentParser.mCompatMode = language != DbgLanguage_Beef;
|
||||||
parentParser.SetSource(terminatedParentExpr.c_str(), terminatedParentExpr.length());
|
parentParser.SetSource(terminatedParentExpr.c_str(), terminatedParentExpr.length());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue