mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Improved hot compilation handling of DLLs
This commit is contained in:
parent
990b509111
commit
c7ae0988dc
9 changed files with 84 additions and 9 deletions
|
@ -16,6 +16,7 @@ namespace IDE
|
|||
case DebugAfter;
|
||||
case DebugComptime;
|
||||
case Test;
|
||||
case WhileRunning;
|
||||
|
||||
public bool WantsRunAfter
|
||||
{
|
||||
|
|
|
@ -25,7 +25,8 @@ namespace IDE.Debugger
|
|||
Terminating,
|
||||
Terminated,
|
||||
SearchingSymSrv,
|
||||
HotResolve
|
||||
HotResolve,
|
||||
TargetUnloaded
|
||||
}
|
||||
|
||||
public enum IntDisplayType
|
||||
|
@ -172,6 +173,9 @@ namespace IDE.Debugger
|
|||
[CallingConvention(.Stdcall),CLink]
|
||||
static extern RunState Debugger_GetRunState();
|
||||
|
||||
[CallingConvention(.Stdcall),CLink]
|
||||
static extern bool Debugger_HasLoadedTargetBinary();
|
||||
|
||||
[CallingConvention(.Stdcall),CLink]
|
||||
static extern char8* Debugger_GetCurrentException();
|
||||
|
||||
|
@ -534,6 +538,11 @@ namespace IDE.Debugger
|
|||
return Debugger_GetRunState();
|
||||
}
|
||||
|
||||
public bool HasLoadedTargetBinary()
|
||||
{
|
||||
return Debugger_HasLoadedTargetBinary();
|
||||
}
|
||||
|
||||
public bool HasPendingDebugLoads()
|
||||
{
|
||||
return Debugger_HasPendingDebugLoads();
|
||||
|
@ -561,8 +570,8 @@ namespace IDE.Debugger
|
|||
public bool IsPaused(bool allowDebugEvalDone = false)
|
||||
{
|
||||
RunState runState = GetRunState();
|
||||
return (runState == RunState.Paused) || (runState == RunState.Breakpoint) || (runState == RunState.Exception) ||
|
||||
((runState == RunState.DebugEval_Done) && (allowDebugEvalDone));
|
||||
return (runState == .Paused) || (runState == .Breakpoint) || (runState == .Exception) ||
|
||||
((runState == .DebugEval_Done) && (allowDebugEvalDone));
|
||||
}
|
||||
|
||||
public void GetCurrentException(String exStr)
|
||||
|
|
|
@ -4501,6 +4501,10 @@ namespace IDE
|
|||
Compile(compileKind, null);
|
||||
}
|
||||
}
|
||||
else if ((mDebugger.mIsRunning) && (!mDebugger.HasLoadedTargetBinary()))
|
||||
{
|
||||
Compile(.WhileRunning, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
mOutputPanel.Clear();
|
||||
|
@ -11588,7 +11592,7 @@ namespace IDE
|
|||
if (mExecutionQueue.Count > 0)
|
||||
return false;
|
||||
|
||||
if ((mDebugger != null) && (mDebugger.mIsRunning) && (hotProject == null))
|
||||
if ((mDebugger != null) && (mDebugger.mIsRunning) && (hotProject == null) && (compileKind != .WhileRunning))
|
||||
{
|
||||
Debug.Assert(!mDebugger.mIsRunningCompiled);
|
||||
Debug.Assert((compileKind == .Normal) || (compileKind == .DebugComptime));
|
||||
|
@ -13416,8 +13420,9 @@ namespace IDE
|
|||
mBreakpointPanel.MarkStatsDirty();
|
||||
mTargetHadFirstBreak = true;
|
||||
|
||||
if (mDebugger.GetRunState() == DebugManager.RunState.Exception)
|
||||
switch (mDebugger.GetRunState())
|
||||
{
|
||||
case .Exception:
|
||||
String exceptionLine = scope String();
|
||||
mDebugger.GetCurrentException(exceptionLine);
|
||||
var exceptionData = String.StackSplit!(exceptionLine, '\n');
|
||||
|
@ -13431,11 +13436,26 @@ namespace IDE
|
|||
OutputLine(exString);
|
||||
if (!IsCrashDump)
|
||||
Fail(exString);
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if ((mDebugger != null) && (mDebugger.GetRunState() == .TargetUnloaded))
|
||||
{
|
||||
if (mWorkspace.mHadHotCompileSinceLastFullCompile)
|
||||
{
|
||||
// Had hot compiles - we need to recompile!
|
||||
Compile(.WhileRunning);
|
||||
}
|
||||
else
|
||||
{
|
||||
mDebugger.Continue();
|
||||
}
|
||||
mWorkspace.StoppedRunning();
|
||||
break;
|
||||
}
|
||||
else if (mDebuggerPerformingTask)
|
||||
{
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue