public UnitTestEngine(Settings settings) { Settings = AppLocationsSettings.GetAppLocations(); Settings.SetValue("Compiler.MethodScanner", false); Settings.SetValue("Compiler.Multithreading", true); Settings.SetValue("Compiler.Platform", "x86"); Settings.SetValue("CompilerDebug.DebugFile", "%DEFAULT%"); Settings.SetValue("CompilerDebug.AsmFile", "%DEFAULT%"); Settings.SetValue("CompilerDebug.MapFile", "%DEFAULT%"); Settings.SetValue("CompilerDebug.InlinedFile", "%DEFAULT%"); Settings.SetValue("CompilerDebug.NasmFile", string.Empty); Settings.SetValue("Optimizations.Basic", true); Settings.SetValue("Optimizations.BitTracker", true); Settings.SetValue("Optimizations.Inline", true); Settings.SetValue("Optimizations.Inline.AggressiveMaximum", 24); Settings.SetValue("Optimizations.Inline.ExplicitOnly", false); Settings.SetValue("Optimizations.Inline.Maximum", 12); Settings.SetValue("Optimizations.LongExpansion", true); Settings.SetValue("Optimizations.LoopInvariantCodeMotion", true); Settings.SetValue("Optimizations.Platform", true); Settings.SetValue("Optimizations.SCCP", true); Settings.SetValue("Optimizations.Devirtualization", true); Settings.SetValue("Optimizations.SSA", true); Settings.SetValue("Optimizations.TwoPass", true); Settings.SetValue("Optimizations.ValueNumbering", true); Settings.SetValue("Multiboot.Video", false); Settings.SetValue("Multiboot.Video.Width", 640); Settings.SetValue("Multiboot.Video.Height", 480); Settings.SetValue("Multiboot.Video.Depth", 32); Settings.SetValue("Emulator.Display", true); Settings.SetValue("OS.Name", "MOSA"); Settings.Merge(settings); Settings.SetValue("Compiler.BaseAddress", 0x00500000); Settings.SetValue("Compiler.Binary", true); Settings.SetValue("Compiler.TraceLevel", 0); Settings.SetValue("Launcher.PlugKorlib", true); Settings.SetValue("Multiboot.Version", "v1"); Settings.SetValue("Emulator", "Qemu"); Settings.SetValue("Emulator.Memory", 128); Settings.SetValue("Emulator.Serial", "TCPServer"); Settings.SetValue("Emulator.Serial.Host", "127.0.0.1"); Settings.SetValue("Emulator.Serial.Port", "11110"); Settings.SetValue("Emulator.Serial.Pipe", "MOSA"); Settings.SetValue("Launcher.Start", false); Settings.SetValue("Launcher.Launch", false); Settings.SetValue("Launcher.Exit", true); Settings.SetValue("Launcher.HuntForCorLib", true); Settings.SetValue("Image.BootLoader", "syslinux3.72"); Settings.SetValue("Image.Folder", Path.Combine(Path.GetTempPath(), "MOSA-UnitTest")); Settings.SetValue("Image.Format", "IMG"); Settings.SetValue("Image.FileSystem", "FAT16"); Settings.SetValue("Image.ImageFile", "%DEFAULT%"); Initialize(); }
public MainForm() { InitializeComponent(); Settings = AppLocationsSettings.GetAppLocations(); AddOutput($"Current Directory: {Environment.CurrentDirectory}"); cbBootFormat.SelectedIndex = 0; RegisterPlatforms(); }
public Launcher() { InitializeComponent(); Settings = AppLocationsSettings.GetAppLocations(); AddOutput($"Current Directory: {Environment.CurrentDirectory}"); lbName.Text = "MOSA Launcher v" + CompilerVersion.VersionString; cmbFormat.SelectedIndex = 0; RegisterPlatforms(); }
internal static int Main(string[] args) { Settings = AppLocationsSettings.GetAppLocations(); NotifyStatus($"Current Directory: {Environment.CurrentDirectory}"); RegisterPlatforms(); LoadArguments(args); try { var compilerHooks = CreateCompilerHooks(); Builder = new Builder(Settings, compilerHooks); Builder.Build(); if (!Builder.IsSucccessful) { NotifyStatus($"Aborting! A build error has occurred."); return(1); } else { if (Settings.GetValue("Launcher.Launch", false)) { var starter = new Starter(Builder.Settings, compilerHooks, Builder.Linker); if (!starter.Launch()) { NotifyStatus($"Aborting! A launch error has occurred."); return(1); } } } } catch (Exception e) { NotifyStatus($"Exception: {e.ToString()}"); return(1); } return(0); }
public MainForm() { InitializeComponent(); outputView = new OutputView(this); registersView = new RegisterView(this); displayView = new DisplayView(this); controlView = new ControlView(this); traceView = new TraceView(this); callStackView = new CallStackView(this); stackFrameView = new StackFrameView(this); statusView = new StatusView(this); symbolView = new SymbolView(this); watchView = new WatchView(this); breakPointView = new BreakpointView(this); instructionView = new InstructionView(this); methodView = new MethodView(this); methodParametersView = new MethodParametersView(this); //scriptView = new ScriptView(this); sourceView = new SourceView(this); sourceDataView = new SourceDataView(this); // only useful when debugging this tool launchView = new LaunchView(this); Settings = AppLocationsSettings.GetAppLocations(); Settings.SetValue("Emulator.GDB", true); Settings.SetValue("Emulator.Serial", "TCPServer"); Settings.SetValue("Emulator.Serial.Port", 1250); Settings.SetValue("Emulator.Display", false); GDBPort = 1234; AppDomain.CurrentDomain.DomainUnload += (s, e) => { KillVMProcess(); }; AppDomain.CurrentDomain.ProcessExit += (s, e) => { KillVMProcess(); }; AppDomain.CurrentDomain.UnhandledException += (s, e) => { KillVMProcess(); }; }