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

Trimmed some debug memory

This commit is contained in:
Brian Fiete 2020-03-20 09:23:38 -07:00
parent b16ff3048a
commit 13ca5c174d
4 changed files with 41 additions and 71 deletions

View file

@ -956,15 +956,11 @@ void DbgSrcFile::GetHash(String& outStr)
DbgType::DbgType()
{
mTypeIdx = -1;
//mHash = 0;
mIsDeclaration = false;
mParent = NULL;
//mName = NULL;
mTypeName = NULL;
mTypeCode = DbgType_Null;
mSize = 0;
//mArraySize = 0;
mDeclLine = 0;
mPtrType = NULL;
mTypeParam = NULL;
mBlockParam = NULL;
@ -1833,6 +1829,7 @@ void DbgType::ToString(StringImpl& str, DbgLanguage language, bool allowDirectBf
str += " ";
mTypeParam->ToString(str, language, allowDirectBfObject, internalName);
}
return;
}
if (mTypeParam == NULL)
{

View file

@ -376,7 +376,6 @@ public:
const char* mName;
const char* mLinkName;
int mTemplateNameIdx;
int mDeclLine;
int mFrameBaseLen;
int mPrologueSize;
const uint8* mFrameBaseData;
@ -386,15 +385,15 @@ public:
int mStepFilterVersion;
LocalBaseRegKind mParamBaseReg;
LocalBaseRegKind mLocalBaseReg;
bool mHasQualifiedName;
bool mIsStepFiltered;
bool mIsStepFilteredDefault;
bool mVirtual;
bool mHasThis;
bool mNeedLineDataFixup;
bool mHasQualifiedName:1;
bool mIsStepFiltered:1;
bool mIsStepFilteredDefault:1;
bool mVirtual:1;
bool mHasThis:1;
bool mNeedLineDataFixup:1;
bool mIsOptimized:1;
bool mHasLineAddrGaps:1; // There are gaps of addresses which are not covered by lineinfo
HotReplaceKind mHotReplaceKind;
bool mIsOptimized;
bool mHasLineAddrGaps; // There are gaps of addresses which are not covered by lineinfo
DbgLineInfo* mLineInfo;
DbgInlineeInfo* mInlineeInfo;
DbgType* mParentType;
@ -417,8 +416,6 @@ public:
mHasLineAddrGaps = false;
mPrologueSize = -1;
mParentType = NULL;
mDeclLine = 0;
//mInlinerData = NULL;
mInlineeInfo = NULL;
mFrameBaseData = NULL;
mFrameBaseLen = 0;
@ -561,19 +558,17 @@ public:
intptr mSize; // In bytes
int mTemplateNameIdx;
int mAlign;
int mDeclFileIdx;
int mDeclLine;
int mTypeIdx;
uint16 mDefinedMembersSize;
uint16 mMethodsWithParamsCount;
bool mIsIncomplete; // Not fully loaded
bool mIsPacked;
bool mNeedsGlobalsPopulated;
bool mHasGlobalsPopulated;
bool mIsDeclaration;
bool mHasStaticMembers;
bool mHasVTable;
bool mFixedName;
bool mIsIncomplete:1; // Not fully loaded
bool mIsPacked:1;
bool mNeedsGlobalsPopulated:1;
bool mHasGlobalsPopulated:1;
bool mIsDeclaration:1;
bool mHasStaticMembers:1;
bool mHasVTable:1;
bool mFixedName:1;
DbgLanguage mLanguage;
DbgExtType mExtType;
DbgTypePriority mPriority; // Is the one stored in the type map

View file

@ -749,8 +749,7 @@ bool DebugTarget::GetAutoLocalsInBlock(Array<String>& outLocals, DbgSubprogram*
continue;
}
if (//(dwLineData->mLine >= variable->mDeclLine) &&
(variable->mName[0] != '$'))
if ((variable->mName[0] != '$'))
_AddLocal(variable->mName);
}
@ -2264,12 +2263,9 @@ bool DebugTarget::GetValueByNameInBlock_Helper(DbgSubprogram* dwSubprogram, DbgB
}
};
//for (auto variable : dwBlock->mVariables)
for (int varIdx = (int)checkVars.size() - 1; varIdx >= 0; varIdx--)
{
auto variable = checkVars[varIdx];
// if (variable->mDeclFileIdx == 0)
// continue;
if (variable->mRangeStart != 0)
{
@ -2340,9 +2336,6 @@ bool DebugTarget::GetValueByNameInBlock_Helper(DbgSubprogram* dwSubprogram, DbgB
{
for (auto variable : dwSubprogram->mParams)
{
/*if (variable->mDeclFileIdx == 0)
continue;*/
if (variable->mName == NULL)
continue;

View file

@ -10633,9 +10633,6 @@ void WinDebugger::GetCodeAddrInfo(intptr addr, String* outFile, int* outHotIdx,
if (dwEndLineData != NULL)
{
if (subProgram->mDeclLine != 0)
*outDefLineStart = subProgram->mDeclLine - 1;
else
*outDefLineStart = dwStartLineData->mLine;
*outDefLineEnd = dwEndLineData->mLine;
}
@ -10754,16 +10751,7 @@ String WinDebugger::GetStackFrameInfo(int stackFrameIdx, intptr* addr, String* o
{
WdStackFrame* nextStackFrame = mCallStack[actualStackFrameIdx - 1];
auto subProgram = nextStackFrame->mSubProgram;
// int callFileIdx = subProgram->mDeclFileIdx;
// if (callFileIdx > 0)
// {
// DbgSrcFile* srcFile = subProgram->mCompileUnit->mSrcFileRefs[callFileIdx - 1].mSrcFile;
// _CheckHashSrcFile(*outFile, subProgram->mCompileUnit->mDbgModule, srcFile);
// *outFile = srcFile->GetLocalPath();
// *outLine = subProgram->mDeclLine - 1;
// }
// else
{
FixupLineDataForSubprogram(subProgram->mInlineeInfo->mRootInliner);
DbgSubprogram* parentSubprogram = subProgram->mInlineeInfo->mInlineParent; // Require it be in the inline parent
auto foundLine = parentSubprogram->FindClosestLine(subProgram->mBlock.mLowPC, &parentSubprogram);
@ -10774,7 +10762,7 @@ String WinDebugger::GetStackFrameInfo(int stackFrameIdx, intptr* addr, String* o
_CheckHashSrcFile(*outFile, subProgram->mCompileUnit->mDbgModule, srcFile);
*outLine = foundLine->mLine;
}
}
*outLanguage = subProgram->GetLanguage();
*outHotIdx = subProgram->mCompileUnit->mDbgModule->mHotIdx;
*outColumn = -1;
@ -10880,9 +10868,6 @@ String WinDebugger::GetStackFrameInfo(int stackFrameIdx, intptr* addr, String* o
if (dwEndLineData != NULL)
{
if (dwSubprogram->mDeclLine != 0)
*outDefLineStart = dwSubprogram->mDeclLine - 1;
else
*outDefLineStart = dwStartLineData->mLine;
*outDefLineEnd = dwEndLineData->mLine;
}