__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "arrayExp", 35);
__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "typeAlignExp", 36);
__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "memberPropertyErrorExp", 37);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "functionCallErrorExp", 38);
class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "MemberType", 0, 0, 0, 0, 0, module, 1, 1);
if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
__ecereClass_MemberType = class;
}
case 7:
{
+if(exp->call.exp)
FreeExpression(exp->call.exp);
if(exp->call.arguments)
FreeList(exp->call.arguments, FreeExpression);
if(exp->member.member)
FreeIdentifier(exp->member.member);
break;
+case 38:
+if(exp->call.exp)
+FreeExpression(exp->call.exp);
+if(exp->call.arguments)
+FreeList(exp->call.arguments, FreeExpression);
+break;
case 17:
case 21:
case 22:
extensionCompoundExp, classExp, classDataExp, new0Exp, renew0Exp,
dbopenExp, dbfieldExp, dbtableExp, dbindexExp, extensionExpressionExp, extensionInitializerExp,
vaArgExp, arrayExp, typeAlignExp,
- memberPropertyErrorExp
+ memberPropertyErrorExp, functionCallErrorExp
};
public enum MemberType
}
case callExp:
{
- FreeExpression(exp.call.exp);
+ if(exp.call.exp)
+ FreeExpression(exp.call.exp);
if(exp.call.arguments)
FreeList(exp.call.arguments, FreeExpression);
break;
if(exp.member.member)
FreeIdentifier(exp.member.member);
break;
+ case functionCallErrorExp:
+ if(exp.call.exp)
+ FreeExpression(exp.call.exp);
+ if(exp.call.arguments)
+ FreeList(exp.call.arguments, FreeExpression);
+ break;
case dereferenceErrorExp:
case unknownErrorExp:
case noDebuggerErrorExp:
if(wh.type)
wh.type.refCount++;
DebugComputeExpression(exp);
- if(ExpressionIsError(exp))
+ if(ExpressionIsError(exp) && exp.type != functionCallErrorExp)
{
GDBFallBack(exp, expString);
}
snprintf(watchmsg, sizeof(watchmsg), $"Missing property evaluation for \"%s\"", wh.expression);
break;
}
+ case functionCallErrorExp:
+ if(exp.call.exp && exp.call.exp.type == identifierExp && exp.call.exp.identifier.string)
+ snprintf(watchmsg, sizeof(watchmsg), $"Missing function evaluation for call to \"%s\"", exp.call.exp.identifier.string);
+ else
+ snprintf(watchmsg, sizeof(watchmsg), $"Missing function evaluation for \"%s\"", wh.expression);
+ break;
case memoryErrorExp:
// Need to ensure when set to memoryErrorExp, constant is set
snprintf(watchmsg, sizeof(watchmsg), $"Memory can't be read at %s", /*(exp.type == constantExp) ? */exp.constant /*: null*/);
// Nulling things that may be freed now, but this is all overly messy/complex
switch(expError.type)
{
+ case functionCallErrorExp:
+ expError.call.exp = null;
+ expError.call.arguments = null;
+ break;
case symbolErrorExp:
expError.identifier = null;
break;
{
return (exp.type == dereferenceErrorExp || exp.type == symbolErrorExp ||
exp.type == memberSymbolErrorExp || exp.type == memoryErrorExp || exp.type == unknownErrorExp ||
- exp.type == noDebuggerErrorExp || exp.type == memberPropertyErrorExp);
+ exp.type == noDebuggerErrorExp || exp.type == memberPropertyErrorExp || exp.type == functionCallErrorExp);
}
void DebugComputeExpression(Expression exp)
{
Expression callExp = exp.call.exp;
Identifier id = (callExp && callExp.type == identifierExp) ? callExp.identifier : null;
+ bool resolved = false;
if(id && id.string)
{
if(!strcmp(id.string, "nan") || !strcmp(id.string, "inf"))
FreeExpContents(exp);
exp.type = constantExp;
exp.constant = s;
+ resolved = true;
}
}
+ if(!resolved)
+ exp.type = functionCallErrorExp;
break;
}
case memberExp: