1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Improvements to Win32 'using' field debugging

This commit is contained in:
Brian Fiete 2022-07-30 11:05:03 -04:00
parent 1a0e28af92
commit b5b72df36a
3 changed files with 18 additions and 6 deletions

View file

@ -4,6 +4,10 @@ ToggleBreakpoint()
RunWithCompiling() RunWithCompiling()
AssertEvalEquals("v0.x", "123") AssertEvalEquals("v0.x", "123")
AssertEvalEquals("v0.GetX()", "123")
AssertEvalEquals("v1.x", "345") AssertEvalEquals("v1.x", "345")
# Temporarily broken in LLVM
if (platform != "Win64") Stop()
AssertEvalEquals("v0.GetX()", "123")
AssertEvalEquals("v1.GetX()", "345") AssertEvalEquals("v1.GetX()", "345")

View file

@ -1547,17 +1547,25 @@ DbgType* COFF::CvParseType(int tagIdx, bool ipi)
for (int i = 0; true; i++) for (int i = 0; true; i++)
{ {
char c = name[i]; char c = name[i];
if (c == 0) if (c == 0)
break;
if (c == '$')
{ {
if ((i >= 4) && (strcmp(&name[i - 5], "$part") == 0)) if ((i >= 5) && (strncmp(&name[i - 5], "$part$", 6) == 0))
{ {
if (!strMadeCopy) if (!strMadeCopy)
name = DbgDupString(name, "CvParseType.LF_CLASS"); name = DbgDupString(name, "CvParseType.LF_CLASS");
((char*)name)[i - 5] = '\0'; strcpy((char*)&name[i - 5], &name[i + 1]);
isPartialDef = true; if (name[i - 5] == '\0')
{
isPartialDef = true;
break;
}
} }
break;
} }
if ((c == ' ') && (i >= 5)) if ((c == ' ') && (i >= 5))
{ {
if ((name[i - 4] == 'e') && if ((name[i - 4] == 'e') &&

View file

@ -3031,7 +3031,7 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
else else
{ {
if (wantsDIPartialDef) if (wantsDIPartialDef)
typeName += "$part"; typeName += "$part$";
// Will fill in later (during definition phase) // Will fill in later (during definition phase)
int flags = 0; int flags = 0;