mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-18 08:06:04 +02:00
Show comptime emits as embedded sourceviews
This commit is contained in:
parent
ee27f6fd02
commit
4d1e14a1c3
65 changed files with 3360 additions and 633 deletions
|
@ -372,6 +372,9 @@ namespace IDE.Debugger
|
|||
[CallingConvention(.Stdcall),CLink]
|
||||
static extern int Debugger_GetDbgAllocHeapSize();
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern char8* Debugger_GetEmitSource(char8* fileName);
|
||||
|
||||
public String mRunningPath ~ delete _;
|
||||
public bool mIsRunning;
|
||||
public bool mIsRunningCompiled;
|
||||
|
@ -382,8 +385,9 @@ namespace IDE.Debugger
|
|||
public int32 mActiveCallStackIdx;
|
||||
public Event<Action> mBreakpointsChangedDelegate ~ _.Dispose();
|
||||
public Breakpoint mRunToCursorBreakpoint;
|
||||
public int32 mDebugIdx;
|
||||
|
||||
bool IsRunning
|
||||
public bool IsRunning
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -391,6 +395,14 @@ namespace IDE.Debugger
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsRunningUncompiled
|
||||
{
|
||||
get
|
||||
{
|
||||
return mIsRunning && !mIsRunningCompiled;
|
||||
}
|
||||
}
|
||||
|
||||
public this()
|
||||
{
|
||||
Debugger_Create();
|
||||
|
@ -975,7 +987,14 @@ namespace IDE.Debugger
|
|||
stackSize = stackSizeOut;
|
||||
|
||||
if (outFile != null)
|
||||
{
|
||||
outFile.Append(fileStrPtr);
|
||||
if ((outFile.StartsWith("$Emit")) && (mIsRunningCompiled))
|
||||
{
|
||||
int dollarPos = outFile.IndexOf('$', 1);
|
||||
outFile.Remove(5, dollarPos - 5);
|
||||
}
|
||||
}
|
||||
if (outStackFrameInfo != null)
|
||||
outStackFrameInfo.Append(locationStr);
|
||||
}
|
||||
|
@ -1224,5 +1243,14 @@ namespace IDE.Debugger
|
|||
{
|
||||
return Debugger_GetDbgAllocHeapSize();
|
||||
}
|
||||
|
||||
public bool GetEmitSource(StringView fileName, String outText)
|
||||
{
|
||||
char8* str = Debugger_GetEmitSource(fileName.ToScopeCStr!());
|
||||
if (str == null)
|
||||
return false;
|
||||
outText.Append(str);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue