Permalink
Browse files

- Backported updates from future 1.7 release

- New ASM Output
- Updated QEMU
- GDB Integration
  • Loading branch information...
1 parent 9976bc8 commit 5405925ff5a6b372d005259cd020a1fc94fae31b @tgiphil tgiphil committed Sep 20, 2016
Showing with 1,664 additions and 1,880 deletions.
  1. +1 −2 Source/Mosa.Compiler.Framework/CompilerOptions.cs
  2. +0 −6 Source/Mosa.Tool.Compiler/Compiler.cs
  3. +0 −1 Source/Mosa.Tool.Explorer/Main.cs
  4. +1,272 −1,233 Source/Mosa.Tool.Launcher/MainForm.Designer.cs
  5. +7 −5 Source/Mosa.Tool.Launcher/MainForm.cs
  6. +1 −1 Source/Mosa.Tool.Launcher/MainForm.resx
  7. +2 −2 Source/Mosa.Tool.Launcher/Mosa.Tool.Launcher.csproj
  8. +67 −47 Source/Mosa.Utility.Launcher/AppLocations.cs
  9. +16 −0 Source/Mosa.Utility.Launcher/BaseLauncher.cs
  10. +81 −6 Source/Mosa.Utility.Launcher/Builder.cs
  11. +2 −1 Source/Mosa.Utility.Launcher/BuilderEventListener.cs
  12. +7 −0 Source/Mosa.Utility.Launcher/Mosa.Utility.Launcher.csproj
  13. +15 −4 Source/Mosa.Utility.Launcher/Options.cs
  14. +66 −9 Source/Mosa.Utility.Launcher/Starter.cs
  15. +4 −0 Source/Mosa.Utility.Launcher/packages.config
  16. BIN Tools/7zip/7za.exe
  17. +9 −8 Tools/7zip/License.txt
  18. +0 −504 Tools/7zip/copying.txt
  19. +105 −23 Tools/7zip/readme.txt
  20. +8 −6 Tools/{readme.txt → Readme.md}
  21. +1 −0 Tools/gdb/Readme.md
  22. +0 −17 Tools/peter-bochs/.gitignore
  23. +0 −4 Tools/peter-bochs/GetPeterBochs.bat
  24. +0 −1 Tools/peter-bochs/readme.txt
  25. BIN Tools/qemu/SDL.dll
  26. BIN Tools/qemu/{bios → }/bios-256k.bin
  27. BIN Tools/qemu/bios.bin
  28. BIN Tools/qemu/bios/bios.bin
  29. BIN Tools/qemu/bios/efi-e1000.rom
  30. BIN Tools/qemu/bios/efi-eepro100.rom
  31. BIN Tools/qemu/bios/efi-ne2k_pci.rom
  32. BIN Tools/qemu/bios/efi-pcnet.rom
  33. BIN Tools/qemu/bios/efi-rtl8139.rom
  34. BIN Tools/qemu/bios/efi-virtio.rom
  35. BIN Tools/qemu/bios/kvmvapic.bin
  36. BIN Tools/qemu/bios/sgabios.bin
  37. BIN Tools/qemu/efi-e1000.rom
  38. BIN Tools/qemu/efi-e1000e.rom
  39. BIN Tools/qemu/efi-eepro100.rom
  40. BIN Tools/qemu/efi-ne2k_pci.rom
  41. BIN Tools/qemu/efi-pcnet.rom
  42. BIN Tools/qemu/efi-rtl8139.rom
  43. BIN Tools/qemu/efi-virtio.rom
  44. BIN Tools/qemu/efi-vmxnet3.rom
  45. BIN Tools/qemu/gdiplus.dll
  46. BIN Tools/qemu/libatk-1.0-0.dll
  47. BIN Tools/qemu/libbz2-2.dll
  48. BIN Tools/qemu/libcairo-2.dll
  49. BIN Tools/qemu/libcairo-gobject-2.dll
  50. BIN Tools/qemu/libcurl-4.dll
  51. BIN Tools/qemu/libeay32.dll
  52. BIN Tools/qemu/libexpat-1.dll
  53. BIN Tools/qemu/libffi-6.dll
  54. BIN Tools/qemu/libfontconfig-1.dll
  55. BIN Tools/qemu/libfreetype-6.dll
  56. BIN Tools/qemu/libgcc_s_dw2-1.dll
  57. BIN Tools/qemu/libgcc_s_seh-1.dll
  58. BIN Tools/qemu/libgdk-3-0.dll
  59. BIN Tools/qemu/libgdk_pixbuf-2.0-0.dll
  60. BIN Tools/qemu/libgio-2.0-0.dll
  61. BIN Tools/qemu/libglib-2.0-0.dll
  62. BIN Tools/qemu/libgmodule-2.0-0.dll
  63. BIN Tools/qemu/libgobject-2.0-0.dll
  64. BIN Tools/qemu/libgthread-2.0-0.dll
  65. BIN Tools/qemu/libgtk-3-0.dll
  66. BIN Tools/qemu/libiconv-2.dll
  67. BIN Tools/qemu/libintl-8.dll
  68. BIN Tools/qemu/libjpeg-9.dll
  69. BIN Tools/qemu/liblzma-5.dll
  70. BIN Tools/qemu/libpango-1.0-0.dll
  71. BIN Tools/qemu/libpangocairo-1.0-0.dll
  72. BIN Tools/qemu/libpangoft2-1.0-0.dll
  73. BIN Tools/qemu/libpangowin32-1.0-0.dll
  74. BIN Tools/qemu/libpixman-1-0.dll
  75. BIN Tools/qemu/libpng15-15.dll
  76. BIN Tools/qemu/libssh2-1.dll
  77. BIN Tools/qemu/libssp-0.dll
  78. BIN Tools/qemu/libstdc++-6.dll
  79. BIN Tools/qemu/libusb-1.0.dll
  80. BIN Tools/qemu/libxml2-2.dll
  81. BIN Tools/qemu/libz-1.dll
  82. BIN Tools/qemu/pthreadGC2.dll
  83. BIN Tools/qemu/{bios → }/pxe-e1000.rom
  84. BIN Tools/qemu/{bios → }/pxe-eepro100.rom
  85. BIN Tools/qemu/{bios → }/pxe-ne2k_pci.rom
  86. BIN Tools/qemu/{bios → }/pxe-pcnet.rom
  87. BIN Tools/qemu/{bios → }/pxe-rtl8139.rom
  88. BIN Tools/qemu/{bios → }/pxe-virtio.rom
  89. BIN Tools/qemu/qemu-img.exe
  90. BIN Tools/qemu/qemu-io.exe
  91. BIN Tools/qemu/qemu-system-arm.exe
  92. BIN Tools/qemu/qemu-system-armw.exe
  93. BIN Tools/qemu/qemu-system-i386.exe
  94. BIN Tools/qemu/qemu-system-i386w.exe
  95. BIN Tools/qemu/qemu-system-x86_64.exe
  96. BIN Tools/qemu/qemu-system-x86_64w.exe
  97. BIN Tools/qemu/{bios → }/vgabios-cirrus.bin
  98. BIN Tools/qemu/{bios → }/vgabios-qxl.bin
  99. BIN Tools/qemu/{bios → }/vgabios-stdvga.bin
  100. BIN Tools/qemu/{bios → }/vgabios-virtio.bin
  101. BIN Tools/qemu/{bios → }/vgabios-vmware.bin
  102. BIN Tools/qemu/{bios → }/vgabios.bin
  103. BIN Tools/qemu/zlib1.dll
@@ -70,7 +70,7 @@ public class CompilerOptions
/// <value>
/// <c>true</c> if [enable promote temporary variables optimization]; otherwise, <c>false</c>.
/// </value>
- public bool EnableVariablePromotion { get; set; }
+ public bool EnableVariablePromotion { get { return EnableOptimizations; } }
/// <summary>
/// Gets or sets a value indicating whether [enable conditional constant propagation].
@@ -260,7 +260,6 @@ public CompilerOptions()
{
EnableSSA = true;
EnableOptimizations = true;
- EnableVariablePromotion = true;
EnableSparseConditionalConstantPropagation = true;
EnableInlinedMethods = true;
BaseAddress = 0x00400000;
@@ -181,12 +181,6 @@ public Compiler()
);
optionSet.Add(
- @"promote-variables|enable-variable-promotion",
- @"Enables variable promotion optimization.",
- enable => compiler.CompilerOptions.EnableVariablePromotion = enable != null
- );
-
- optionSet.Add(
@"emit-symbols",
@"Emits the Symbol Table.",
enable => compiler.CompilerOptions.EmitSymbols = enable != null
@@ -213,7 +213,6 @@ private void SetCompilerOptions()
{
Compiler.CompilerOptions.EnableSSA = enableSSA.Checked;
Compiler.CompilerOptions.EnableOptimizations = enableOptimizations.Checked;
- Compiler.CompilerOptions.EnableVariablePromotion = enableVariablePromotion.Checked;
Compiler.CompilerOptions.EnableSparseConditionalConstantPropagation = enableSparseConditionalConstantPropagation.Checked;
Compiler.CompilerOptions.EmitBinary = enableBinaryCodeGeneration.Checked;
Compiler.CompilerOptions.EnableInlinedMethods = enableInlinedMethods.Checked;
Oops, something went wrong.
@@ -56,12 +56,13 @@ private void UpdateBuilderOptions()
{
Options.EnableSSA = cbEnableSSA.Checked;
Options.EnableIROptimizations = cbEnableIROptimizations.Checked;
- Options.EnableVariablePromotion = cbEnableVariablePromotion.Checked;
Options.EnableSparseConditionalConstantPropagation = cbEnableSparseConditionalConstantPropagation.Checked;
+ Options.GenerateNASMFile = cbGenerateNASMFile.Checked;
Options.GenerateASMFile = cbGenerateASMFile.Checked;
Options.GenerateMapFile = cbGenerateMapFile.Checked;
Options.ExitOnLaunch = cbExitOnLaunch.Checked;
- Options.MOSADebugger = cbMOSADebugger.Checked;
+ Options.EnableQemuGDB = cbEnableQemuGDB.Checked;
+ Options.LaunchGDB = cbLaunchGDB.Checked;
Options.UseMultipleThreadCompiler = cbCompilerUsesMultipleThreads.Checked;
Options.MemoryInMB = (uint)nmMemory.Value;
Options.EnableInlinedMethods = cbInlinedMethods.Checked;
@@ -163,12 +164,13 @@ private void UpdateInterfaceOptions()
{
cbEnableSSA.Checked = Options.EnableSSA;
cbEnableIROptimizations.Checked = Options.EnableIROptimizations;
- cbEnableVariablePromotion.Checked = Options.EnableVariablePromotion;
cbEnableSparseConditionalConstantPropagation.Checked = Options.EnableSparseConditionalConstantPropagation;
+ cbGenerateNASMFile.Checked = Options.GenerateNASMFile;
cbGenerateASMFile.Checked = Options.GenerateASMFile;
cbGenerateMapFile.Checked = Options.GenerateMapFile;
cbExitOnLaunch.Checked = Options.ExitOnLaunch;
- cbMOSADebugger.Checked = Options.MOSADebugger;
+ cbEnableQemuGDB.Checked = Options.EnableQemuGDB;
+ cbLaunchGDB.Checked = Options.LaunchGDB;
cbInlinedMethods.Checked = Options.EnableInlinedMethods;
cbCompilerUsesMultipleThreads.Checked = Options.UseMultipleThreadCompiler;
nmMemory.Value = Options.MemoryInMB;
@@ -424,7 +426,7 @@ private void CompileCompleted()
string imageFile = Options.BootLoaderImage != null ? Options.BootLoaderImage : Builder.ImageFile;
- Starter = new Starter(Options, AppLocations, imageFile, this);
+ Starter = new Starter(Options, AppLocations, imageFile, this, Builder.Linker);
Starter.Launch();
}
@@ -130,7 +130,7 @@
<value>326, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>64</value>
+ <value>25</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>WinExe</OutputType>
@@ -29,6 +29,7 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
+ <UseMSBuildEngine>false</UseMSBuildEngine>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -80,7 +81,6 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="WeifenLuo.WinFormsUI.Docking">
- <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\3rdParty\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
</Reference>
</ItemGroup>
@@ -22,6 +22,8 @@ public class AppLocations
public string mkisofs { get; set; }
+ public string GDB { get; set; }
+
// TODO: The following methods should be placed in another class, possibly as a class extension
public void FindApplications()
@@ -32,14 +34,14 @@ public void FindApplications()
QEMU = TryFind(
new string[] { "qemu-system-i386.exe", "qemu-system-i386" },
new string[] {
- CombineParameterAndDirectory("MOSA",@"Tools\QEMU"),
- CombineParameterAndDirectory("MOSA",@"QEMU"),
- @"..\Tools\QEMU",
- @"Tools\QEMU",
- CombineParameterAndDirectory("ProgramFiles",@"qemu"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"qemu"),
- @"/bin"
- }
+ CombineParameterAndDirectory("MOSA",@"Tools\QEMU"),
+ CombineParameterAndDirectory("MOSA",@"QEMU"),
+ @"..\Tools\QEMU",
+ @"Tools\QEMU",
+ CombineParameterAndDirectory("ProgramFiles",@"qemu"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"qemu"),
+ @"/bin"
+ }
);
}
@@ -67,11 +69,9 @@ public void FindApplications()
QEMUBIOSDirectory = Path.GetDirectoryName(
TryFind(
new string[] { "bios.bin" },
- new string[]
- {
+ new string[] {
Path.GetDirectoryName(QEMU),
- Path.Combine(Path.GetDirectoryName(QEMU), "bios"),
- "/usr/share/qemu"
+ Path.Combine(Path.GetDirectoryName(QEMU), "bios"),"/usr/share/qemu"
}
)
);
@@ -83,13 +83,13 @@ public void FindApplications()
// find NDISMASM
NDISASM = TryFind(
new string[] { "ndisasm.exe", "ndisasm" },
- new string[] {
- CombineParameterAndDirectory("MOSA",@"Tools\ndisasm"),
- CombineParameterAndDirectory("MOSA",@"ndisasm"),
- @"..\Tools\ndisasm",
- @"Tools\ndisasm",
- @"/bin"
- }
+ new string[] {
+ CombineParameterAndDirectory("MOSA",@"Tools\ndisasm"),
+ CombineParameterAndDirectory("MOSA",@"ndisasm"),
+ @"..\Tools\ndisasm",
+ @"Tools\ndisasm",
+ @"/bin"
+ }
);
}
if (string.IsNullOrEmpty(BOCHS))
@@ -98,18 +98,18 @@ public void FindApplications()
BOCHS = TryFind(
new string[] { "bochs.exe", "bochs" },
new string[] {
- CombineParameterAndDirectory("ProgramFiles",@"Bochs-2.6.8"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"Bochs-2.6.8"),
- CombineParameterAndDirectory("ProgramFiles",@"Bochs-2.6.5"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"Bochs-2.6.5"),
- CombineParameterAndDirectory("ProgramFiles",@"Bochs-2.6.2"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"Bochs-2.6.2"),
- CombineParameterAndDirectory("MOSA",@"Tools\Bochs"),
- CombineParameterAndDirectory("MOSA",@"Bochs"),
- @"..\Tools\Bochs",
- @"Tools\Bochs",
- @"/bin"
- }
+ CombineParameterAndDirectory("ProgramFiles",@"Bochs-2.6.8"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"Bochs-2.6.8"),
+ CombineParameterAndDirectory("ProgramFiles",@"Bochs-2.6.5"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"Bochs-2.6.5"),
+ CombineParameterAndDirectory("ProgramFiles",@"Bochs-2.6.2"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"Bochs-2.6.2"),
+ CombineParameterAndDirectory("MOSA",@"Tools\Bochs"),
+ CombineParameterAndDirectory("MOSA",@"Bochs"),
+ @"..\Tools\Bochs",
+ @"Tools\Bochs",
+ @"/bin"
+ }
);
}
@@ -119,12 +119,12 @@ public void FindApplications()
VMwarePlayer = TryFind(
new string[] { "vmplayer.exe", "vmplayer" },
new string[] {
- CombineParameterAndDirectory("ProgramFiles",@"VMware\VMware Player"),
- CombineParameterAndDirectory("ProgramFiles",@"VMware\VMware Workstation"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"VMware\VMware Player"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"VMware\VMware Workstation"),
- @"/bin"
- }
+ CombineParameterAndDirectory("ProgramFiles",@"VMware\VMware Player"),
+ CombineParameterAndDirectory("ProgramFiles",@"VMware\VMware Workstation"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"VMware\VMware Player"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"VMware\VMware Workstation"),
+ @"/bin"
+ }
);
}
@@ -134,16 +134,36 @@ public void FindApplications()
mkisofs = TryFind(
new string[] { "mkisofs.exe", "mkisofs" },
new string[] {
- CombineParameterAndDirectory("ProgramFiles",@"VMware\VMware Player"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"VMware\VMware Player"),
- CombineParameterAndDirectory("ProgramFiles",@"cdrtools"),
- CombineParameterAndDirectory("ProgramFiles(x86)",@"cdrtools"),
- CombineParameterAndDirectory("MOSA",@"Tools\mkisofs"),
- CombineParameterAndDirectory("MOSA",@"mkisofs"),
- @"..\Tools\mkisofs",
- @"Tools\mkisofs",
- @"/bin"
- }
+ CombineParameterAndDirectory("ProgramFiles",@"VMware\VMware Player"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"VMware\VMware Player"),
+ CombineParameterAndDirectory("ProgramFiles",@"cdrtools"),
+ CombineParameterAndDirectory("ProgramFiles(x86)",@"cdrtools"),
+ CombineParameterAndDirectory("MOSA",@"Tools\mkisofs"),
+ CombineParameterAndDirectory("MOSA",@"mkisofs"),
+ @"..\Tools\mkisofs",
+ @"Tools\mkisofs",
+ @"/bin"
+ }
+ );
+ }
+
+ if (string.IsNullOrEmpty(GDB))
+ {
+ // find GDB
+ GDB = TryFind(
+ new string[] { "gdb.exe" },
+ new string[] {
+ CombineParameterAndDirectory("MOSA",@"Tools\gdb"),
+ CombineParameterAndDirectory("MOSA",@"gdb"),
+ @"..\Tools\gdb",
+ @"Tools\gdb",
+ @"C:\cygwin64\bin",
+ @"C:\mingw64\bin",
+ @"C:\cygwin\bin",
+ @"C:\mingw32\bin",
+ @"C:\mingw\bin",
+ @"/bin"
+ }
);
}
}
@@ -70,6 +70,22 @@ protected Process LaunchApplication(string app, string args)
return Process.Start(start);
}
+ protected Process LaunchConsoleApplication(string app, string args)
+ {
+ AddOutput("Launching Application: " + app);
+ AddOutput("Arguments: " + args);
+
+ var start = new ProcessStartInfo();
+ start.FileName = app;
+ start.Arguments = args;
+ start.UseShellExecute = false;
+ start.CreateNoWindow = false;
+ start.RedirectStandardOutput = false;
+ start.RedirectStandardError = false;
+
+ return Process.Start(start);
+ }
+
protected string GetOutput(Process process)
{
var output = process.StandardOutput.ReadToEnd();
Oops, something went wrong.

0 comments on commit 5405925

Please sign in to comment.