mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Working on installer, fixing more Win32 issues
Throwing error on member references with ".." cascade token outside invocations (ie: "ts..mA = 123") Fixed 'Thread.ModuleTLSIndex' error - which caused us TLS lookup failures in Beef DLLs Fixed some hotswap errors Made BeefPerf shut down properly Fixed an 'int literal' FixIntUnknown issue where rhs was System.Object which caused an illegal boxing Fixed COFF::LocateSymbol issues with Win32 and also with linking to static libraries - showed up with hot-linking in fmod when hot-adding a floating point mod Fixed a couple memory leaks Fixed alignment issue in COFF::ParseCompileUnit
This commit is contained in:
parent
aad0a640c5
commit
b63a243fd7
73 changed files with 2474 additions and 293 deletions
|
@ -27,7 +27,7 @@ TargetDirectory = "$(WorkspaceDir)/dist"
|
|||
TargetName = "BeefIDE_d"
|
||||
OtherLinkFlags = "$(LinkFlags) Comdlg32.lib kernel32.lib user32.lib advapi32.lib shell32.lib IDEHelper64_d.lib"
|
||||
CLibType = "Dynamic"
|
||||
DebugCommandArguments = "-test=scripts\\Minidump.txt -testNoExit"
|
||||
DebugCommandArguments = "-proddir=C:\\Beef\\IDE\\Tests\\Test1 -platform=Win32 -test=scripts\\Break.txt -testNoExit"
|
||||
DebugWorkingDirectory = "c:\\Beef\\IDE\\Tests\\EmptyTest"
|
||||
EnvironmentVars = ["_NO_DEBUG_HEAP=1"]
|
||||
|
||||
|
|
8
IDE/Tests/Test1/scripts/HotSwap_LocateSym01.txt
Normal file
8
IDE/Tests/Test1/scripts/HotSwap_LocateSym01.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
ShowFile("src/HotSwap_LocateSym01.bf")
|
||||
GotoText("//Test_Start")
|
||||
ToggleBreakpoint()
|
||||
RunWithCompiling()
|
||||
ToggleCommentAt("UseMod_Mod")
|
||||
Compile()
|
||||
StepOver()
|
||||
AssertEvalEquals("f", "7")
|
23
IDE/Tests/Test1/src/HotSwap_LocateSym01.bf
Normal file
23
IDE/Tests/Test1/src/HotSwap_LocateSym01.bf
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
namespace IDETest
|
||||
{
|
||||
class HotSwap_LocateSym01
|
||||
{
|
||||
static float UseMod()
|
||||
{
|
||||
float f = 100.0f;
|
||||
/*UseMod_Mod
|
||||
f = f % 31.0f;
|
||||
*/
|
||||
return f;
|
||||
}
|
||||
|
||||
public static void Test()
|
||||
{
|
||||
int a = 0;
|
||||
//Test_Start
|
||||
float f = UseMod();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@ namespace IDETest
|
|||
HotSwap_Data.Test();
|
||||
HotSwap_GetUnusued.Test();
|
||||
HotSwap_Interfaces2.Test();
|
||||
HotSwap_LocateSym01.Test();
|
||||
HotSwap_Reflection.Test();
|
||||
HotSwap_TLS.Test();
|
||||
InlineTester.Test();
|
||||
|
|
8
IDE/Tests/TestDynCrt1/BeefProj.toml
Normal file
8
IDE/Tests/TestDynCrt1/BeefProj.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
FileVersion = 1
|
||||
|
||||
[Project]
|
||||
Name = "TestStaticCrt1"
|
||||
StartupObject = "TestStaticCrt1.Program"
|
||||
|
||||
[Configs.Debug.Win64]
|
||||
CLibType = "DynamicDebug"
|
5
IDE/Tests/TestDynCrt1/BeefSpace.toml
Normal file
5
IDE/Tests/TestDynCrt1/BeefSpace.toml
Normal file
|
@ -0,0 +1,5 @@
|
|||
FileVersion = 1
|
||||
Projects = {TestStaticCrt1 = {Path = "."}}
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "TestStaticCrt1"
|
8
IDE/Tests/TestDynCrt1/scripts/HotSwap_LocateSym01.txt
Normal file
8
IDE/Tests/TestDynCrt1/scripts/HotSwap_LocateSym01.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
ShowFile("src/HotSwap_LocateSym01.bf")
|
||||
GotoText("//Test_Start")
|
||||
ToggleBreakpoint()
|
||||
RunWithCompiling()
|
||||
ToggleCommentAt("UseMod_Mod")
|
||||
Compile()
|
||||
StepOver()
|
||||
AssertEvalEquals("f", "7")
|
23
IDE/Tests/TestDynCrt1/src/HotSwap_LocateSym01.bf
Normal file
23
IDE/Tests/TestDynCrt1/src/HotSwap_LocateSym01.bf
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
namespace TestStaticCrt1
|
||||
{
|
||||
class HotSwap_LocateSym01
|
||||
{
|
||||
static float UseMod()
|
||||
{
|
||||
float f = 100.0f;
|
||||
/*UseMod_Mod
|
||||
f = f % 31.0f;
|
||||
*/
|
||||
return f;
|
||||
}
|
||||
|
||||
public static void Test()
|
||||
{
|
||||
int a = 0;
|
||||
//Test_Start
|
||||
float f = UseMod();
|
||||
}
|
||||
}
|
||||
}
|
10
IDE/Tests/TestDynCrt1/src/Program.bf
Normal file
10
IDE/Tests/TestDynCrt1/src/Program.bf
Normal file
|
@ -0,0 +1,10 @@
|
|||
namespace TestStaticCrt1
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
HotSwap_LocateSym01.Test();
|
||||
}
|
||||
}
|
||||
}
|
6
IDE/dist/BeefConfig.toml
vendored
6
IDE/dist/BeefConfig.toml
vendored
|
@ -8,4 +8,8 @@ Location = { Path = "../../BeefLibs/corlib" }
|
|||
|
||||
[Registry.Beefy2D]
|
||||
Version = "1.0.0"
|
||||
Location = { Path = "../../BeefLibs/Beefy2D" }
|
||||
Location = { Path = "../../BeefLibs/Beefy2D" }
|
||||
|
||||
[Registry.SDL2]
|
||||
Version = "1.0.0"
|
||||
Location = { Path = "../../BeefLibs/SDL2" }
|
|
@ -8,7 +8,7 @@ DefaultNamespace = "Mintest"
|
|||
Aliases = ["corlib"]
|
||||
|
||||
[Configs.Debug.Win64]
|
||||
CLibType = "DynamicDebug"
|
||||
CLibType = "Static"
|
||||
BeefLibType = "DynamicDebug"
|
||||
StackSize = 4194304
|
||||
DebugCommandArguments = "hey=\"yo man\" zag= zoogles boof stoopers \"\"\"abc efg\"\"\""
|
||||
|
|
|
@ -125,15 +125,24 @@ class Blurg
|
|||
|
||||
public static int GetInt()
|
||||
{
|
||||
float f = 10.0f;
|
||||
//f = f % 3.0f;
|
||||
|
||||
return 123;
|
||||
}
|
||||
|
||||
public static void Hey()
|
||||
{
|
||||
float f = 1.2f;
|
||||
//f = f % 2.3f;
|
||||
|
||||
TestStruct ts = .();
|
||||
//int val = ts..mA;
|
||||
ts.mA = 123;
|
||||
|
||||
GetInt();
|
||||
GetInt();
|
||||
|
||||
VoidCall();
|
||||
int val0 = GetInt();
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace IDE.Debugger
|
|||
static extern bool Debugger_OpenMiniDump(char8* filename);
|
||||
|
||||
[StdCall,CLink]
|
||||
static extern bool Debugger_OpenFile(char8* fileName, char8* args, char8* workingDir, void* envBlockPtr, int32 envBlockLen);
|
||||
static extern bool Debugger_OpenFile(char8* launchPath, char8* targetPath, char8* args, char8* workingDir, void* envBlockPtr, int32 envBlockLen);
|
||||
|
||||
[StdCall,CLink]
|
||||
static extern bool Debugger_Attach(int32 processId, AttachFlags attachFlags);
|
||||
|
@ -405,13 +405,13 @@ namespace IDE.Debugger
|
|||
Debugger_FullReportMemory();
|
||||
}
|
||||
|
||||
public bool OpenFile(String file, String args, String workingDir, Span<char8> envBlock, bool isCompiled)
|
||||
public bool OpenFile(String launchPath, String targetPath, String args, String workingDir, Span<char8> envBlock, bool isCompiled)
|
||||
{
|
||||
DeleteAndNullify!(mRunningPath);
|
||||
mRunningPath = new String(file);
|
||||
mRunningPath = new String(launchPath);
|
||||
|
||||
mIsRunningCompiled = isCompiled;
|
||||
return Debugger_OpenFile(file, args, workingDir, envBlock.Ptr, (int32)envBlock.Length);
|
||||
return Debugger_OpenFile(launchPath, targetPath, args, workingDir, envBlock.Ptr, (int32)envBlock.Length);
|
||||
}
|
||||
|
||||
public void SetSymSrvOptions(String symCacheDir, String symSrvStr, SymSrvFlags symSrvFlags)
|
||||
|
|
|
@ -9295,8 +9295,8 @@ namespace IDE
|
|||
|
||||
//options.mDebugOptions.mCommand
|
||||
|
||||
String targetPath = scope String();
|
||||
ResolveConfigString(workspaceOptions, project, options, options.mDebugOptions.mCommand, "debug command", targetPath);
|
||||
String launchPath = scope String();
|
||||
ResolveConfigString(workspaceOptions, project, options, options.mDebugOptions.mCommand, "debug command", launchPath);
|
||||
String arguments = scope String();
|
||||
ResolveConfigString(workspaceOptions, project, options, "$(Arguments)", "debug command arguments", arguments);
|
||||
String workingDirRel = scope String();
|
||||
|
@ -9304,8 +9304,14 @@ namespace IDE
|
|||
var workingDir = scope String();
|
||||
Path.GetAbsolutePath(workingDirRel, project.mProjectDir, workingDir);
|
||||
|
||||
String targetPath = scope .();
|
||||
ResolveConfigString(workspaceOptions, project, options, "$(TargetPath)", "Target path", targetPath);
|
||||
|
||||
IDEUtils.FixFilePath(launchPath);
|
||||
IDEUtils.FixFilePath(targetPath);
|
||||
|
||||
if (workingDir.IsEmpty)
|
||||
Path.GetDirectoryPath(targetPath, workingDir);
|
||||
Path.GetDirectoryPath(launchPath, workingDir);
|
||||
|
||||
if (!Directory.Exists(workingDir))
|
||||
{
|
||||
|
@ -9333,13 +9339,13 @@ namespace IDE
|
|||
var envBlock = scope List<char8>();
|
||||
Environment.EncodeEnvironmentVariables(envVars, envBlock);
|
||||
|
||||
if (targetPath.IsWhiteSpace)
|
||||
if (launchPath.IsWhiteSpace)
|
||||
{
|
||||
Fail(scope String()..AppendF("No debug command specified in '{}' properties", project.mProjectName));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mDebugger.OpenFile(targetPath, arguments, workingDir, envBlock, wasCompiled))
|
||||
if (!mDebugger.OpenFile(launchPath, targetPath, arguments, workingDir, envBlock, wasCompiled))
|
||||
{
|
||||
DeleteAndNullify!(mCompileAndRunStopwatch);
|
||||
return false;
|
||||
|
@ -11338,6 +11344,11 @@ namespace IDE
|
|||
{
|
||||
scope AutoBeefPerf("IDEApp.Update");
|
||||
|
||||
/*using (mWorkspace.mMonitor.Enter())
|
||||
{
|
||||
|
||||
}*/
|
||||
|
||||
if (mDbgFastUpdate)
|
||||
{
|
||||
RefreshRate = 240;
|
||||
|
|
|
@ -458,7 +458,7 @@ namespace IDE
|
|||
|
||||
var envBlock = scope List<char8>();
|
||||
Environment.EncodeEnvironmentVariables(envVars, envBlock);
|
||||
if (!gApp.mDebugger.OpenFile(curProjectInfo.mTestExePath, mTestInstance.mArgs, mTestInstance.mWorkingDir, envBlock, true))
|
||||
if (!gApp.mDebugger.OpenFile(curProjectInfo.mTestExePath, curProjectInfo.mTestExePath, mTestInstance.mArgs, mTestInstance.mWorkingDir, envBlock, true))
|
||||
{
|
||||
QueueOutputLine("ERROR: Failed debug '{0}'", curProjectInfo.mTestExePath);
|
||||
TestFailed();
|
||||
|
|
|
@ -332,7 +332,7 @@ namespace IDE.ui
|
|||
var envBlock = scope List<char8>();
|
||||
Environment.EncodeEnvironmentVariables(envVars, envBlock);
|
||||
|
||||
if (!gApp.mDebugger.OpenFile(targetPath, arguments, workingDir, envBlock, false))
|
||||
if (!gApp.mDebugger.OpenFile(targetPath, targetPath, arguments, workingDir, envBlock, false))
|
||||
{
|
||||
gApp.Fail(scope String()..AppendF("Unable to open executable for debugging: {0}", targetPath));
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue