mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed step out in disassembly
This commit is contained in:
parent
07fd22f9e0
commit
ace51cb7be
5 changed files with 16 additions and 84 deletions
|
@ -897,11 +897,6 @@ void BeMCColorizer::Prepare()
|
|||
mReserveParamRegs = false;
|
||||
mNodes.Resize(mContext->mVRegInfo.size());
|
||||
|
||||
if (mContext->mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
for (int vregIdx = 0; vregIdx < (int)mNodes.size(); vregIdx++)
|
||||
{
|
||||
auto node = &mNodes[vregIdx];
|
||||
|
@ -1282,11 +1277,6 @@ void BeMCColorizer::GenerateRegCosts()
|
|||
|
||||
void BeMCColorizer::AssignRegs(RegKind regKind)
|
||||
{
|
||||
if (mContext->mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
X64CPURegister highestReg;
|
||||
|
||||
int totalRegs32 = 0;
|
||||
|
@ -3339,11 +3329,6 @@ void BeMCContext::CreateBinarySwitchSection(BeSwitchInst* switchInst, int startI
|
|||
|
||||
void BeMCContext::CreateCondBr(BeMCBlock* mcBlock, BeMCOperand& testVal, const BeMCOperand& trueBlock, const BeMCOperand& falseBlock)
|
||||
{
|
||||
if (mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
if (testVal.IsImmediate())
|
||||
{
|
||||
if (testVal.mImmediate != 0)
|
||||
|
@ -3785,11 +3770,6 @@ BeMCOperand BeMCContext::AllocRelativeVirtualReg(BeType* type, const BeMCOperand
|
|||
BF_ASSERT(relTo.IsVRegAny());
|
||||
auto relToVRegInfo = GetVRegInfo(relTo);
|
||||
|
||||
if ((mDebugging) && (mVRegInfo.size() == 5))
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
if ((relToVRegInfo->mRelTo) && (relToVRegInfo->mRelOffsetScale == 1) && (relToVRegInfo->mRelOffset.IsImmediate()) &&
|
||||
(relOffset.IsImmediate()) && (relScale == 1))
|
||||
{
|
||||
|
@ -6948,11 +6928,6 @@ void BeMCContext::DoInstCombinePass()
|
|||
BeVTrackingValue vTrackingVal((int)mVRegInfo.size());
|
||||
HashSet<int> wantUnwrapVRegs;
|
||||
|
||||
if (mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
for (auto mcBlock : mBlocks)
|
||||
{
|
||||
BeDbgLoc* curDbgLoc = NULL;
|
||||
|
@ -8170,11 +8145,6 @@ bool BeMCContext::DoLegalization()
|
|||
auto inst = mcBlock->mInstructions[instIdx];
|
||||
SetCurrentInst(inst);
|
||||
|
||||
if ((mDebugging) && (inst->mKind == BeMCInstKind_IMul))
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
if (inst->mKind == BeMCInstKind_Mov)
|
||||
{
|
||||
// Useless mov, remove it
|
||||
|
@ -8841,13 +8811,6 @@ bool BeMCContext::DoLegalization()
|
|||
int disp = 0;
|
||||
int errorVRegIdx = -1;
|
||||
bool isValid = GetRMParams(inst->mArg0, regA, regB, bScale, disp, &errorVRegIdx) != BeMCRMMode_Invalid;
|
||||
if (mDebugging)
|
||||
{
|
||||
if ((inst->mArg0.mVRegIdx == 272) || (inst->mArg0.mVRegIdx == 274))
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isValid)
|
||||
{
|
||||
|
@ -10609,11 +10572,6 @@ void BeMCContext::DoRegFinalization()
|
|||
{
|
||||
case BeMCInstKind_PreserveVolatiles:
|
||||
{
|
||||
if (mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
int preserveIdx;
|
||||
BeMCInst* preserveInst;
|
||||
BeMCInst* restoreInst;
|
||||
|
@ -11490,10 +11448,6 @@ void BeMCContext::EmitAggMov(const BeMCOperand& dest, const BeMCOperand& src)
|
|||
int curOfs = 0;
|
||||
|
||||
bool allowRep = dataVec.size() >= BF_REP_MOV_LIMIT;
|
||||
if (mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
union IntUnion
|
||||
{
|
||||
|
@ -14751,7 +14705,7 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
mDbgPreferredRegs[32] = X64Reg_R8;*/
|
||||
|
||||
//mDbgPreferredRegs[8] = X64Reg_RAX;
|
||||
//mDebugging = function->mName == "?TestTagCount@Program@bf@@SAXXZ";
|
||||
//mDebugging = function->mName == "?Hey@Blurg@bf@@SAXXZ";
|
||||
//"?ColorizeCodeString@IDEUtils@IDE@bf@@SAXPEAVString@System@3@W4CodeKind@123@@Z";
|
||||
//"?Main@Program@bf@@CAHPEAV?$Array1@PEAVString@System@bf@@@System@2@@Z";
|
||||
|
||||
|
@ -15281,11 +15235,6 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
break;
|
||||
case BeAllocaInst::TypeId:
|
||||
{
|
||||
if (mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
int homeSize = BF_ALIGN(BF_MAX(mMaxCallParamCount, 4) * 8, 16);
|
||||
auto castedInst = (BeAllocaInst*)inst;
|
||||
auto mcSize = BeMCOperand::FromImmediate(castedInst->mType->mSize);
|
||||
|
@ -15755,11 +15704,6 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
break;
|
||||
case BeCondBrInst::TypeId:
|
||||
{
|
||||
if (mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
auto castedInst = (BeCondBrInst*)inst;
|
||||
auto testVal = GetOperand(castedInst->mCond, true);
|
||||
auto trueBlock = GetOperand(castedInst->mTrueBlock);
|
||||
|
@ -16301,11 +16245,6 @@ void BeMCContext::Generate(BeFunction* function)
|
|||
break;
|
||||
case BeDbgDeclareInst::TypeId:
|
||||
{
|
||||
if (mDebugging)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
auto castedInst = (BeDbgDeclareInst*)inst;
|
||||
auto dbgVar = castedInst->mDbgVar;
|
||||
auto mcValue = GetOperand(castedInst->mValue);
|
||||
|
|
|
@ -2599,6 +2599,7 @@ void BeModule::DoInlining(BeFunction* func)
|
|||
auto destDbgGlobalVar = mOwnedValues.Alloc<BeDbgVariable>();
|
||||
destDbgGlobalVar->mName = dbgGlobalVar->mName;
|
||||
destDbgGlobalVar->mType = dbgGlobalVar->mType;
|
||||
destDbgGlobalVar->mInitType = dbgGlobalVar->mInitType;
|
||||
if (dbgGlobalVar->mValue != NULL)
|
||||
{
|
||||
BF_ASSERT(BeValueDynCast<BeConstant>(dbgGlobalVar->mValue) != NULL);
|
||||
|
|
|
@ -1135,16 +1135,6 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
|
|||
if (bfAutocomplete != NULL)
|
||||
bfAutocomplete->CheckTypeRef(varDecl->mTypeRef, true, true);
|
||||
|
||||
// if (varDecl->mNameNode == NULL)
|
||||
// {
|
||||
// // Minimum parsing requirements
|
||||
// auto resolvedType = ResolveTypeRef(varDecl->mTypeRef);
|
||||
// if (resolvedType != NULL)
|
||||
// AddDependency(resolvedType, mCurTypeInstance, BfDependencyMap::DependencyFlag_LocalUsage);
|
||||
// AssertErrorState();
|
||||
// return NULL;
|
||||
// }
|
||||
|
||||
bool isConst = (varDecl->mModSpecifier != NULL) && (varDecl->mModSpecifier->GetToken() == BfToken_Const);
|
||||
bool isReadOnly = (varDecl->mModSpecifier != NULL) && (varDecl->mModSpecifier->GetToken() == BfToken_ReadOnly);
|
||||
|
||||
|
|
|
@ -4324,6 +4324,8 @@ bool WinDebugger::SetupStep(StepType stepType)
|
|||
CPUInst inst;
|
||||
while (true)
|
||||
{
|
||||
if (mStepInAssembly)
|
||||
break;
|
||||
if (!mDebugTarget->DecodeInstruction(pcAddress, &inst))
|
||||
break;
|
||||
if ((inst.IsBranch()) || (inst.IsCall()) || (inst.IsReturn()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue