[submodule "external/buildtools"]
path = external/buildtools
url = git://github.com/mono/buildtools.git
+[submodule "external/cecil-legacy"]
+ path = external/cecil-legacy
+ url = git://github.com/mono/cecil.git
+ branch = mono-legacy-0.9.5
{
LCID lcid = GetThreadLocale();
gchar buf[19];
- gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
+ gint ccBuf = GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, buf, 9);
buf[ccBuf - 1] = '-';
- ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
+ ccBuf += GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
return g_strdup (buf);
}
-Subproject commit 33d50b874fd527118bc361d83de3d494e8bb55e1
+Subproject commit ea18396c86ab3f8ba5d0fcd9ada9e066bd4f9f92
--- /dev/null
+Subproject commit 33d50b874fd527118bc361d83de3d494e8bb55e1
# define __KERNEL__
# include <asm/signal.h>
# undef __KERNEL__
-# else
+# elif defined(__GLIBC__)
/* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */
/* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */
/* prototypes, so we have to include the top-level sigcontext.h to */
System.Workflow.ComponentModel \
System.Workflow.Runtime \
System.Reflection.Context \
+ legacy/Mono.Cecil \
$(pcl_facade_dirs)
xbuild_2_0_dirs := \
if (!String.IsNullOrEmpty (ToolsVersion))
return ToolsVersion;
+#if XBUILD_14
+ return "14.0";
+#elif XBUILD_12
+ return "12.0";
+#else
if (!HasToolsVersionAttribute)
return parentEngine.DefaultToolsVersion;
}
return DefaultToolsVersion;
+#endif
}
void AddProjectExtensions (XmlElement xmlElement)
-../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/AssemblyInfo.cs
-../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
-../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/MdbWriter.cs
-../../../external/cecil/symbols/mdb/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
-../../../external/cecil/symbols/mdb/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
-../../../external/cecil/symbols/mdb/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs
-../../../external/cecil/symbols/mdb/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
+../../../external/cecil/ProjectInfo.cs
+../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/*.cs
+../../../external/cecil/symbols/mdb/Mono.CompilerServices.SymbolWriter/*.cs
LIBRARY_PACKAGE = none
LIB_REFS = System.Core
-LIB_MCS_FLAGS = -keyfile:$(LIBRARY_SNK) -d:NET_3_5 /publicsign
+LIB_MCS_FLAGS = -keyfile:$(LIBRARY_SNK) -d:NET_4_0 /publicsign
NO_TEST = yes
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{59019979-D337-441B-851F-2133452191A8}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Mono.Cecil</RootNamespace>
- <AssemblyName>Mono.Cecil</AssemblyName>
- <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <SilverlightApplication>false</SilverlightApplication>
- <DefineConstants>TRACE;DEBUG;SILVERLIGHT</DefineConstants>
- <NoStdLib>true</NoStdLib>
- <NoConfig>true</NoConfig>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>mono.snk</AssemblyOriginatorKeyFile>
- <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
- <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\DebugSL\</OutputPath>
- <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\ReleaseSL\</OutputPath>
- <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="system" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Mono.Cecil.Cil\Code.cs" />
- <Compile Include="Mono.Cecil.Cil\CodeWriter.cs" />
- <Compile Include="Mono.Cecil.Cil\CodeReader.cs" />
- <Compile Include="Mono.Cecil.Cil\Document.cs" />
- <Compile Include="Mono.Cecil.Cil\ExceptionHandler.cs" />
- <Compile Include="Mono.Cecil.Cil\ILProcessor.cs" />
- <Compile Include="Mono.Cecil.Cil\Instruction.cs" />
- <Compile Include="Mono.Cecil.Cil\MethodBody.cs" />
- <Compile Include="Mono.Cecil.Cil\OpCode.cs" />
- <Compile Include="Mono.Cecil.Cil\OpCodes.cs" />
- <Compile Include="Mono.Cecil.Cil\SequencePoint.cs" />
- <Compile Include="Mono.Cecil.Cil\Symbols.cs" />
- <Compile Include="Mono.Cecil.Cil\VariableDefinition.cs" />
- <Compile Include="Mono.Cecil.Cil\VariableReference.cs" />
- <Compile Include="Mono.Cecil.Metadata\BlobHeap.cs" />
- <Compile Include="Mono.Cecil.Metadata\Buffers.cs" />
- <Compile Include="Mono.Cecil.Metadata\CodedIndex.cs" />
- <Compile Include="Mono.Cecil.Metadata\ElementType.cs" />
- <Compile Include="Mono.Cecil.Metadata\GuidHeap.cs" />
- <Compile Include="Mono.Cecil.Metadata\Heap.cs" />
- <Compile Include="Mono.Cecil.Metadata\MetadataToken.cs" />
- <Compile Include="Mono.Cecil.Metadata\Row.cs" />
- <Compile Include="Mono.Cecil.Metadata\StringHeap.cs" />
- <Compile Include="Mono.Cecil.Metadata\TableHeap.cs" />
- <Compile Include="Mono.Cecil.Metadata\TokenType.cs" />
- <Compile Include="Mono.Cecil.Metadata\UserStringHeap.cs" />
- <Compile Include="Mono.Cecil.Metadata\Utilities.cs" />
- <Compile Include="Mono.Cecil.PE\BinaryStreamReader.cs" />
- <Compile Include="Mono.Cecil.PE\BinaryStreamWriter.cs" />
- <Compile Include="Mono.Cecil.PE\ByteBuffer.cs" />
- <Compile Include="Mono.Cecil.PE\ByteBufferEqualityComparer.cs" />
- <Compile Include="Mono.Cecil.PE\DataDirectory.cs" />
- <Compile Include="Mono.Cecil.PE\Image.cs" />
- <Compile Include="Mono.Cecil.PE\ImageReader.cs" />
- <Compile Include="Mono.Cecil.PE\ImageWriter.cs" />
- <Compile Include="Mono.Cecil.PE\Section.cs" />
- <Compile Include="Mono.Cecil.PE\TextMap.cs" />
- <Compile Include="Mono.Cecil\ArrayType.cs" />
- <Compile Include="Mono.Cecil\AssemblyDefinition.cs" />
- <Compile Include="Mono.Cecil\AssemblyFlags.cs" />
- <Compile Include="Mono.Cecil\AssemblyHashAlgorithm.cs" />
- <Compile Include="Mono.Cecil\AssemblyInfo.cs" />
- <Compile Include="Mono.Cecil\AssemblyLinkedResource.cs" />
- <Compile Include="Mono.Cecil\AssemblyNameDefinition.cs" />
- <Compile Include="Mono.Cecil\AssemblyNameReference.cs" />
- <Compile Include="Mono.Cecil\AssemblyReader.cs" />
- <Compile Include="Mono.Cecil\AssemblyWriter.cs" />
- <Compile Include="Mono.Cecil\BaseAssemblyResolver.cs" />
- <Compile Include="Mono.Cecil\CallSite.cs" />
- <Compile Include="Mono.Cecil\CustomAttribute.cs" />
- <Compile Include="Mono.Cecil\DefaultAssemblyResolver.cs" />
- <Compile Include="Mono.Cecil\ExportedType.cs" />
- <Compile Include="Mono.Cecil\FileAttributes.cs" />
- <Compile Include="Mono.Cecil\FunctionPointerType.cs" />
- <Compile Include="Mono.Cecil\GenericInstanceMethod.cs" />
- <Compile Include="Mono.Cecil\GenericInstanceType.cs" />
- <Compile Include="Mono.Cecil\GenericParameter.cs" />
- <Compile Include="Mono.Cecil\GenericParameterAttributes.cs" />
- <Compile Include="Mono.Cecil\IConstantProvider.cs" />
- <Compile Include="Mono.Cecil\ICustomAttributeProvider.cs" />
- <Compile Include="Mono.Cecil\IGenericInstance.cs" />
- <Compile Include="Mono.Cecil\IGenericParameterProvider.cs" />
- <Compile Include="Mono.Cecil\IMarshalInfoProvider.cs" />
- <Compile Include="Mono.Cecil\MarshalInfo.cs" />
- <Compile Include="Mono.Cecil\MetadataResolver.cs" />
- <Compile Include="Mono.Cecil\Modifiers.cs" />
- <Compile Include="Mono.Cecil\NativeType.cs" />
- <Compile Include="Mono.Cecil\PinnedType.cs" />
- <Compile Include="Mono.Cecil\MetadataSystem.cs" />
- <Compile Include="Mono.Cecil\IMethodSignature.cs" />
- <Compile Include="Mono.Cecil\ParameterDefinitionCollection.cs" />
- <Compile Include="Mono.Cecil\EmbeddedResource.cs" />
- <Compile Include="Mono.Cecil\EventAttributes.cs" />
- <Compile Include="Mono.Cecil\EventDefinition.cs" />
- <Compile Include="Mono.Cecil\EventReference.cs" />
- <Compile Include="Mono.Cecil\FieldAttributes.cs" />
- <Compile Include="Mono.Cecil\FieldDefinition.cs" />
- <Compile Include="Mono.Cecil\FieldReference.cs" />
- <Compile Include="Mono.Cecil\IMemberDefinition.cs" />
- <Compile Include="Mono.Cecil\Import.cs" />
- <Compile Include="Mono.Cecil\LinkedResource.cs" />
- <Compile Include="Mono.Cecil\MemberReference.cs" />
- <Compile Include="Mono.Cecil\MethodAttributes.cs" />
- <Compile Include="Mono.Cecil\MethodCallingConvention.cs" />
- <Compile Include="Mono.Cecil\MethodDefinition.cs" />
- <Compile Include="Mono.Cecil\MethodImplAttributes.cs" />
- <Compile Include="Mono.Cecil\MethodReference.cs" />
- <Compile Include="Mono.Cecil\MethodReturnType.cs" />
- <Compile Include="Mono.Cecil\MethodSemanticsAttributes.cs" />
- <Compile Include="Mono.Cecil\MethodSpecification.cs" />
- <Compile Include="Mono.Cecil\ParameterAttributes.cs" />
- <Compile Include="Mono.Cecil\ParameterDefinition.cs" />
- <Compile Include="Mono.Cecil\ParameterReference.cs" />
- <Compile Include="Mono.Cecil\PInvokeAttributes.cs" />
- <Compile Include="Mono.Cecil\PInvokeInfo.cs" />
- <Compile Include="Mono.Cecil\PointerType.cs" />
- <Compile Include="Mono.Cecil\PropertyAttributes.cs" />
- <Compile Include="Mono.Cecil\PropertyDefinition.cs" />
- <Compile Include="Mono.Cecil\PropertyReference.cs" />
- <Compile Include="Mono.Cecil\ReferenceType.cs" />
- <Compile Include="Mono.Cecil\IMetadataScope.cs" />
- <Compile Include="Mono.Cecil\IMetadataTokenProvider.cs" />
- <Compile Include="Mono.Cecil\ManifestResourceAttributes.cs" />
- <Compile Include="Mono.Cecil\ModuleReference.cs" />
- <Compile Include="Mono.Cecil\MemberDefinitionCollection.cs" />
- <Compile Include="Mono.Cecil\ModuleDefinition.cs" />
- <Compile Include="Mono.Cecil\ModuleKind.cs" />
- <Compile Include="Mono.Cecil\Resource.cs" />
- <Compile Include="Mono.Cecil\SecurityDeclaration.cs" />
- <Compile Include="Mono.Cecil\SentinelType.cs" />
- <Compile Include="Mono.Cecil\TargetRuntime.cs" />
- <Compile Include="Mono.Cecil\TypeAttributes.cs" />
- <Compile Include="Mono.Cecil\TypeDefinition.cs" />
- <Compile Include="Mono.Cecil\TypeDefinitionCollection.cs" />
- <Compile Include="Mono.Cecil\TypeParser.cs" />
- <Compile Include="Mono.Cecil\TypeReference.cs" />
- <Compile Include="Mono.Cecil\TypeSpecification.cs" />
- <Compile Include="Mono.Cecil\TypeSystem.cs" />
- <Compile Include="Mono.Cecil\VariantType.cs" />
- <Compile Include="Mono.Collections.Generic\Collection.cs" />
- <Compile Include="Mono.Security.Cryptography\CryptoConvert.cs" />
- <Compile Include="Mono.Security.Cryptography\CryptoService.cs" />
- <Compile Include="Mono\Actions.cs" />
- <Compile Include="Mono\Empty.cs" />
- <Compile Include="Mono\Funcs.cs" />
- <Compile Include="System.Runtime.CompilerServices\ExtensionAttribute.cs" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="NOTES.txt" />
- </ItemGroup>
- <ItemGroup>
- <None Include="mono.snk" />
- </ItemGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
- <SilverlightProjectProperties />
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
-</Project>
-../../../external/cecil/Mono.Collections.Generic/Collection.cs
-../../../external/cecil/Mono.Collections.Generic/ReadOnlyCollection.cs
-../../../external/cecil/Mono.Cecil.PE/ImageWriter.cs
-../../../external/cecil/Mono.Cecil.PE/BinaryStreamWriter.cs
-../../../external/cecil/Mono.Cecil.PE/BinaryStreamReader.cs
-../../../external/cecil/Mono.Cecil.PE/DataDirectory.cs
-../../../external/cecil/Mono.Cecil.PE/ByteBuffer.cs
-../../../external/cecil/Mono.Cecil.PE/ByteBufferEqualityComparer.cs
-../../../external/cecil/Mono.Cecil.PE/TextMap.cs
-../../../external/cecil/Mono.Cecil.PE/Section.cs
-../../../external/cecil/Mono.Cecil.PE/Image.cs
-../../../external/cecil/Mono.Cecil.PE/ImageReader.cs
-../../../external/cecil/Mono.Cecil.Metadata/TableHeap.cs
-../../../external/cecil/Mono.Cecil.Metadata/GuidHeap.cs
-../../../external/cecil/Mono.Cecil.Metadata/Heap.cs
-../../../external/cecil/Mono.Cecil.Metadata/TokenType.cs
-../../../external/cecil/Mono.Cecil.Metadata/CodedIndex.cs
-../../../external/cecil/Mono.Cecil.Metadata/ElementType.cs
-../../../external/cecil/Mono.Cecil.Metadata/BlobHeap.cs
-../../../external/cecil/Mono.Cecil.Metadata/Row.cs
-../../../external/cecil/Mono.Cecil.Metadata/MetadataToken.cs
-../../../external/cecil/Mono.Cecil.Metadata/UserStringHeap.cs
-../../../external/cecil/Mono.Cecil.Metadata/Utilities.cs
-../../../external/cecil/Mono.Cecil.Metadata/StringHeap.cs
-../../../external/cecil/Mono.Cecil.Metadata/Buffers.cs
-../../../external/cecil/System.Runtime.CompilerServices/ExtensionAttribute.cs
-../../../external/cecil/Mono.Security.Cryptography/CryptoService.cs
-../../../external/cecil/Mono.Security.Cryptography/CryptoConvert.cs
-../../../external/cecil/Mono/Empty.cs
-../../../external/cecil/Mono/Funcs.cs
-../../../external/cecil/Mono/Actions.cs
-../../../external/cecil/Mono.Cecil.Cil/ILProcessor.cs
-../../../external/cecil/Mono.Cecil.Cil/VariableReference.cs
-../../../external/cecil/Mono.Cecil.Cil/OpCodes.cs
-../../../external/cecil/Mono.Cecil.Cil/MethodBody.cs
-../../../external/cecil/Mono.Cecil.Cil/Instruction.cs
-../../../external/cecil/Mono.Cecil.Cil/Code.cs
-../../../external/cecil/Mono.Cecil.Cil/Symbols.cs
-../../../external/cecil/Mono.Cecil.Cil/CodeWriter.cs
-../../../external/cecil/Mono.Cecil.Cil/CodeReader.cs
-../../../external/cecil/Mono.Cecil.Cil/SequencePoint.cs
-../../../external/cecil/Mono.Cecil.Cil/Document.cs
-../../../external/cecil/Mono.Cecil.Cil/OpCode.cs
-../../../external/cecil/Mono.Cecil.Cil/ExceptionHandler.cs
-../../../external/cecil/Mono.Cecil.Cil/VariableDefinition.cs
-../../../external/cecil/Mono.Cecil/ModuleReference.cs
-../../../external/cecil/Mono.Cecil/TypeParser.cs
-../../../external/cecil/Mono.Cecil/LinkedResource.cs
-../../../external/cecil/Mono.Cecil/IMemberDefinition.cs
-../../../external/cecil/Mono.Cecil/Resource.cs
-../../../external/cecil/Mono.Cecil/ICustomAttributeProvider.cs
-../../../external/cecil/Mono.Cecil/MethodReference.cs
-../../../external/cecil/Mono.Cecil/EventAttributes.cs
-../../../external/cecil/Mono.Cecil/FieldReference.cs
-../../../external/cecil/Mono.Cecil/SentinelType.cs
-../../../external/cecil/Mono.Cecil/MemberReference.cs
-../../../external/cecil/Mono.Cecil/AssemblyReader.cs
-../../../external/cecil/Mono.Cecil/TargetRuntime.cs
-../../../external/cecil/Mono.Cecil/TypeAttributes.cs
-../../../external/cecil/Mono.Cecil/GenericParameter.cs
-../../../external/cecil/Mono.Cecil/MethodImplAttributes.cs
-../../../external/cecil/Mono.Cecil/FileAttributes.cs
-../../../external/cecil/Mono.Cecil/ManifestResourceAttributes.cs
-../../../external/cecil/Mono.Cecil/SecurityDeclaration.cs
-../../../external/cecil/Mono.Cecil/NativeType.cs
-../../../external/cecil/Mono.Cecil/EventReference.cs
-../../../external/cecil/Mono.Cecil/AssemblyWriter.cs
-../../../external/cecil/Mono.Cecil/Modifiers.cs
-../../../external/cecil/Mono.Cecil/IGenericParameterProvider.cs
-../../../external/cecil/Mono.Cecil/ParameterDefinition.cs
-../../../external/cecil/Mono.Cecil/IMetadataScope.cs
-../../../external/cecil/Mono.Cecil/AssemblyNameReference.cs
-../../../external/cecil/Mono.Cecil/ParameterAttributes.cs
-../../../external/cecil/Mono.Cecil/TypeSpecification.cs
-../../../external/cecil/Mono.Cecil/IMetadataTokenProvider.cs
-../../../external/cecil/Mono.Cecil/MethodAttributes.cs
-../../../external/cecil/Mono.Cecil/AssemblyInfo.cs
-../../../external/cecil/Mono.Cecil/IMarshalInfoProvider.cs
-../../../external/cecil/Mono.Cecil/PointerType.cs
-../../../external/cecil/Mono.Cecil/ArrayType.cs
-../../../external/cecil/Mono.Cecil/TypeDefinition.cs
-../../../external/cecil/Mono.Cecil/FunctionPointerType.cs
-../../../external/cecil/Mono.Cecil/MetadataResolver.cs
-../../../external/cecil/Mono.Cecil/Import.cs
-../../../external/cecil/Mono.Cecil/IGenericInstance.cs
-../../../external/cecil/Mono.Cecil/ExportedType.cs
-../../../external/cecil/Mono.Cecil/PInvokeAttributes.cs
-../../../external/cecil/Mono.Cecil/AssemblyHashAlgorithm.cs
-../../../external/cecil/Mono.Cecil/MethodReturnType.cs
-../../../external/cecil/Mono.Cecil/ParameterReference.cs
-../../../external/cecil/Mono.Cecil/AssemblyLinkedResource.cs
-../../../external/cecil/Mono.Cecil/EventDefinition.cs
-../../../external/cecil/Mono.Cecil/FieldAttributes.cs
-../../../external/cecil/Mono.Cecil/AssemblyNameDefinition.cs
-../../../external/cecil/Mono.Cecil/ParameterDefinitionCollection.cs
-../../../external/cecil/Mono.Cecil/ModuleDefinition.cs
-../../../external/cecil/Mono.Cecil/MetadataSystem.cs
-../../../external/cecil/Mono.Cecil/AssemblyFlags.cs
-../../../external/cecil/Mono.Cecil/TypeDefinitionCollection.cs
-../../../external/cecil/Mono.Cecil/CustomAttribute.cs
-../../../external/cecil/Mono.Cecil/MemberDefinitionCollection.cs
-../../../external/cecil/Mono.Cecil/PropertyDefinition.cs
-../../../external/cecil/Mono.Cecil/GenericInstanceType.cs
-../../../external/cecil/Mono.Cecil/ModuleKind.cs
-../../../external/cecil/Mono.Cecil/DefaultAssemblyResolver.cs
-../../../external/cecil/Mono.Cecil/MethodSemanticsAttributes.cs
-../../../external/cecil/Mono.Cecil/EmbeddedResource.cs
-../../../external/cecil/Mono.Cecil/PropertyAttributes.cs
-../../../external/cecil/Mono.Cecil/MethodSpecification.cs
-../../../external/cecil/Mono.Cecil/TypeReference.cs
-../../../external/cecil/Mono.Cecil/IConstantProvider.cs
-../../../external/cecil/Mono.Cecil/MethodDefinition.cs
-../../../external/cecil/Mono.Cecil/PinnedType.cs
-../../../external/cecil/Mono.Cecil/VariantType.cs
-../../../external/cecil/Mono.Cecil/MethodCallingConvention.cs
-../../../external/cecil/Mono.Cecil/TypeSystem.cs
-../../../external/cecil/Mono.Cecil/IMethodSignature.cs
-../../../external/cecil/Mono.Cecil/FieldDefinition.cs
-../../../external/cecil/Mono.Cecil/BaseAssemblyResolver.cs
-../../../external/cecil/Mono.Cecil/PropertyReference.cs
-../../../external/cecil/Mono.Cecil/MarshalInfo.cs
-../../../external/cecil/Mono.Cecil/GenericInstanceMethod.cs
-../../../external/cecil/Mono.Cecil/ReferenceType.cs
-../../../external/cecil/Mono.Cecil/PInvokeInfo.cs
-../../../external/cecil/Mono.Cecil/CallSite.cs
-../../../external/cecil/Mono.Cecil/AssemblyDefinition.cs
-../../../external/cecil/Mono.Cecil/GenericParameterAttributes.cs
+../../../external/cecil/ProjectInfo.cs
+../../../external/cecil/Mono/*.cs
+../../../external/cecil/Mono.Cecil/*.cs
+../../../external/cecil/Mono.Cecil.Cil/*.cs
+../../../external/cecil/Mono.Cecil.Metadata/*.cs
+../../../external/cecil/Mono.Cecil.PE/*.cs
+../../../external/cecil/Mono.Collections.Generic/*.cs
+../../../external/cecil/Mono.Security.Cryptography/*.cs
+../../../external/cecil/System.Security.Cryptography/*.cs
LIBRARY = Mono.CodeContracts.dll
LIB_REFS = System System.Core Mono.Cecil Mono.Cecil.Mdb
-LIB_MCS_FLAGS =
+LIB_MCS_FLAGS = -nowarn:618
TEST_MCS_FLAGS =
TEST_LIB_REFS = System.Core
Instruction originalInst;
if (this.instructionLookup != null) {
// TODO: Doesn't handle inherited contracts - need to check what to do in this case.
- if (this.instructionLookup.TryGetValue (originalExpr, out originalInst)) {
- inst.SequencePoint = originalInst.SequencePoint;
- }
+ //if (this.instructionLookup.TryGetValue (originalExpr, out originalInst)) {
+ // inst.SequencePoint = originalInst.SequencePoint;
+ //}
}
this.fnEmit (inst);
}
public override Expr Visit (Expr e)
{
+ /*
Instruction inst;
if (this.instructionLookup.TryGetValue (e, out inst)) {
var seq = inst.SequencePoint;
}
}
}
+ */
+
return base.Visit (e);
}
method.Parameters.Add (new ParameterDefinition ("message", ParameterAttributes.None, typeString));
method.Parameters.Add (new ParameterDefinition ("conditionText", ParameterAttributes.None, typeString));
method.Parameters.Add (new ParameterDefinition ("inner", ParameterAttributes.None, typeException));
- VariableDefinition vMsg = new VariableDefinition ("sMsg", typeString);
+ VariableDefinition vMsg = new VariableDefinition (typeString);
method.Body.Variables.Add (vMsg);
method.Body.InitLocals = true;
var il = method.Body.GetILProcessor ();
{
if (TypeDefinition == null)
return null;
- return TypeDefinition.Interfaces.Select (i => new TypeNode (i));
+ return TypeDefinition.Interfaces.Select (i => new TypeNode (i.InterfaceType));
}
}
{
const string PreFail = "Precondition failed";
this.ral.Call (fnGood);
- this.CheckException (fnBad, PreFail, condition);
+
+ // FIXME:
+ // this.CheckException (fnBad, PreFail, condition);
}
[Test]
--- /dev/null
+thisdir = class/legacy/Mono.Cecil
+include ../../../build/rules.make
+
+LIBRARY = Mono.Cecil.dll
+LIBRARY_SNK = ../../mono.snk
+LIBRARY_PACKAGE = none
+LIBRARY_SUBDIR = legacy
+
+LIB_REFS = System.Core
+LIB_MCS_FLAGS = -keyfile:$(LIBRARY_SNK) -d:NET_3_5 /publicsign
+
+NO_TEST = yes
+
+include ../../../build/library.make
--- /dev/null
+../../../../external/cecil-legacy/Mono.Collections.Generic/Collection.cs
+../../../../external/cecil-legacy/Mono.Collections.Generic/ReadOnlyCollection.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/ImageWriter.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/BinaryStreamWriter.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/BinaryStreamReader.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/DataDirectory.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/ByteBuffer.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/ByteBufferEqualityComparer.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/TextMap.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/Section.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/Image.cs
+../../../../external/cecil-legacy/Mono.Cecil.PE/ImageReader.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/TableHeap.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/GuidHeap.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/Heap.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/TokenType.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/CodedIndex.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/ElementType.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/BlobHeap.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/Row.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/MetadataToken.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/UserStringHeap.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/Utilities.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/StringHeap.cs
+../../../../external/cecil-legacy/Mono.Cecil.Metadata/Buffers.cs
+../../../../external/cecil-legacy/System.Runtime.CompilerServices/ExtensionAttribute.cs
+../../../../external/cecil-legacy/Mono.Security.Cryptography/CryptoService.cs
+../../../../external/cecil-legacy/Mono.Security.Cryptography/CryptoConvert.cs
+../../../../external/cecil-legacy/Mono/Empty.cs
+../../../../external/cecil-legacy/Mono/Funcs.cs
+../../../../external/cecil-legacy/Mono/Actions.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/ILProcessor.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/VariableReference.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/OpCodes.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/MethodBody.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/Instruction.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/Code.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/Symbols.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/CodeWriter.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/CodeReader.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/SequencePoint.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/Document.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/OpCode.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/ExceptionHandler.cs
+../../../../external/cecil-legacy/Mono.Cecil.Cil/VariableDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/ModuleReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/TypeParser.cs
+../../../../external/cecil-legacy/Mono.Cecil/LinkedResource.cs
+../../../../external/cecil-legacy/Mono.Cecil/IMemberDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/Resource.cs
+../../../../external/cecil-legacy/Mono.Cecil/ICustomAttributeProvider.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/EventAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/FieldReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/SentinelType.cs
+../../../../external/cecil-legacy/Mono.Cecil/MemberReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyReader.cs
+../../../../external/cecil-legacy/Mono.Cecil/TargetRuntime.cs
+../../../../external/cecil-legacy/Mono.Cecil/TypeAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/GenericParameter.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodImplAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/FileAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/ManifestResourceAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/SecurityDeclaration.cs
+../../../../external/cecil-legacy/Mono.Cecil/NativeType.cs
+../../../../external/cecil-legacy/Mono.Cecil/EventReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyWriter.cs
+../../../../external/cecil-legacy/Mono.Cecil/Modifiers.cs
+../../../../external/cecil-legacy/Mono.Cecil/IGenericParameterProvider.cs
+../../../../external/cecil-legacy/Mono.Cecil/ParameterDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/IMetadataScope.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyNameReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/ParameterAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/TypeSpecification.cs
+../../../../external/cecil-legacy/Mono.Cecil/IMetadataTokenProvider.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyInfo.cs
+../../../../external/cecil-legacy/Mono.Cecil/IMarshalInfoProvider.cs
+../../../../external/cecil-legacy/Mono.Cecil/PointerType.cs
+../../../../external/cecil-legacy/Mono.Cecil/ArrayType.cs
+../../../../external/cecil-legacy/Mono.Cecil/TypeDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/FunctionPointerType.cs
+../../../../external/cecil-legacy/Mono.Cecil/MetadataResolver.cs
+../../../../external/cecil-legacy/Mono.Cecil/Import.cs
+../../../../external/cecil-legacy/Mono.Cecil/IGenericInstance.cs
+../../../../external/cecil-legacy/Mono.Cecil/ExportedType.cs
+../../../../external/cecil-legacy/Mono.Cecil/PInvokeAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyHashAlgorithm.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodReturnType.cs
+../../../../external/cecil-legacy/Mono.Cecil/ParameterReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyLinkedResource.cs
+../../../../external/cecil-legacy/Mono.Cecil/EventDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/FieldAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyNameDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/ParameterDefinitionCollection.cs
+../../../../external/cecil-legacy/Mono.Cecil/ModuleDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/MetadataSystem.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyFlags.cs
+../../../../external/cecil-legacy/Mono.Cecil/TypeDefinitionCollection.cs
+../../../../external/cecil-legacy/Mono.Cecil/CustomAttribute.cs
+../../../../external/cecil-legacy/Mono.Cecil/MemberDefinitionCollection.cs
+../../../../external/cecil-legacy/Mono.Cecil/PropertyDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/GenericInstanceType.cs
+../../../../external/cecil-legacy/Mono.Cecil/ModuleKind.cs
+../../../../external/cecil-legacy/Mono.Cecil/DefaultAssemblyResolver.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodSemanticsAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/EmbeddedResource.cs
+../../../../external/cecil-legacy/Mono.Cecil/PropertyAttributes.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodSpecification.cs
+../../../../external/cecil-legacy/Mono.Cecil/TypeReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/IConstantProvider.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/PinnedType.cs
+../../../../external/cecil-legacy/Mono.Cecil/VariantType.cs
+../../../../external/cecil-legacy/Mono.Cecil/MethodCallingConvention.cs
+../../../../external/cecil-legacy/Mono.Cecil/TypeSystem.cs
+../../../../external/cecil-legacy/Mono.Cecil/IMethodSignature.cs
+../../../../external/cecil-legacy/Mono.Cecil/FieldDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/BaseAssemblyResolver.cs
+../../../../external/cecil-legacy/Mono.Cecil/PropertyReference.cs
+../../../../external/cecil-legacy/Mono.Cecil/MarshalInfo.cs
+../../../../external/cecil-legacy/Mono.Cecil/GenericInstanceMethod.cs
+../../../../external/cecil-legacy/Mono.Cecil/ReferenceType.cs
+../../../../external/cecil-legacy/Mono.Cecil/PInvokeInfo.cs
+../../../../external/cecil-legacy/Mono.Cecil/CallSite.cs
+../../../../external/cecil-legacy/Mono.Cecil/AssemblyDefinition.cs
+../../../../external/cecil-legacy/Mono.Cecil/GenericParameterAttributes.cs
static void RewriteAssembly (string assemblyLocation, Dictionary<string, string> resourcesStrings, CmdOptions options)
{
- var readerParameters = new ReaderParameters { ReadSymbols = true };
- var assembly = AssemblyDefinition.ReadAssembly (assemblyLocation, readerParameters);
- foreach (var module in assembly.Modules) {
- foreach (var type in module.GetTypes ()) {
- foreach (var method in type.Methods) {
- if (!method.HasBody)
- continue;
-
- foreach (var instr in method.Body.Instructions) {
- if (instr.OpCode != OpCodes.Ldstr)
+ var readerParameters = new ReaderParameters { ReadSymbols = true, ReadWrite = true };
+ using (var assembly = AssemblyDefinition.ReadAssembly (assemblyLocation, readerParameters)) {
+ foreach (var module in assembly.Modules) {
+ foreach (var type in module.GetTypes ()) {
+ foreach (var method in type.Methods) {
+ if (!method.HasBody)
continue;
-
- string value;
- if (resourcesStrings.TryGetValue ((string)instr.Operand, out value)) {
- if (options.Verbose) {
- Console.WriteLine ($"Replacing '{instr.Operand}' with '{value}'");
+
+ foreach (var instr in method.Body.Instructions) {
+ if (instr.OpCode != OpCodes.Ldstr)
+ continue;
+
+ string value;
+ if (resourcesStrings.TryGetValue ((string)instr.Operand, out value)) {
+ if (options.Verbose) {
+ Console.WriteLine ($"Replacing '{instr.Operand}' with '{value}'");
+ }
+
+ instr.Operand = value;
}
-
- instr.Operand = value;
}
}
}
}
- }
- var writerParameters = new WriterParameters { WriteSymbols = true };
- assembly.Write (assemblyLocation, writerParameters);
+ var writerParameters = new WriterParameters { WriteSymbols = true };
+ assembly.Write (writerParameters);
+ }
}
static bool LoadGetResourceStrings (Dictionary<string, string> resourcesStrings, CmdOptions options)
var ifaces = new Dictionary<string, TypeReference> ();
foreach (var def in WalkHierarchy (type))
- foreach (TypeReference iface in def.Interfaces)
- ifaces [iface.FullName] = iface;
+ foreach (var iface in def.Interfaces)
+ ifaces [iface.InterfaceType.FullName] = iface.InterfaceType;
return ifaces.Values;
}
MarkFields (type, type.IsEnum);
if (type.HasInterfaces) {
- foreach (TypeReference iface in type.Interfaces)
- MarkType (iface);
+ foreach (var iface in type.Interfaces)
+ MarkType (iface.InterfaceType);
}
if (type.HasMethods) {
if (!type.HasInterfaces)
return;
- foreach (TypeReference @interface in type.Interfaces) {
- var iface = @interface.Resolve ();
+ foreach (var @interface in type.Interfaces) {
+ var iface = @interface.InterfaceType.Resolve ();
if (iface == null || !iface.HasMethods)
continue;
if (!type.HasInterfaces)
yield break;
- foreach (TypeReference interface_ref in type.Interfaces) {
- TypeDefinition @interface = interface_ref.Resolve ();
+ foreach (var interface_ref in type.Interfaces) {
+ TypeDefinition @interface = interface_ref.InterfaceType.Resolve ();
if (@interface == null)
continue;
LIB_REFS = monodoc System System.Xml System.Core Mono.Cecil ICSharpCode.SharpZipLib System.Xml.Linq System.Web
LOCAL_MCS_FLAGS = $(MDOC_COMMON_FLAGS)
-PROGRAM = mdoc.exe
+PROGRAM = $(topdir)/class/lib/$(PROFILE)/mdoc.exe
PROGRAM_DEPS = $(topdir)/class/lib/$(PROFILE)/monodoc.dll
ifdef NET
include ../../build/executable.make
-$(PROGRAM) : $(build_lib)
- cp $< $@
-
-$(PROGRAM) : Makefile
-
MONO = \
MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" \
$(RUNTIME) $(RUNTIME_FLAGS)
get {
if (member == null)
throw new ArgumentNullException ("member");
- MemberReference memberDef = member.Resolve ();
+
+ var memberDef = member.Resolve ();
if (memberDef == null) {
ArrayType array = member.DeclaringType as ArrayType;
if (array != null && array.Rank > 1) {
"Unable to resolve member {0}::{1}.",
member.DeclaringType.FullName, member.Name));
}
- string memberDecl = xdoc.GetDeclaration (member.Resolve ());
+ string memberDecl = xdoc.GetDeclaration (member);
Dictionary<string, ExceptionSources> e;
if (!db.TryGetValue (memberDecl, out e)) {
e = new Dictionary<string, ExceptionSources> ();
return method.GenericParameters.Count > 0;
}
- public static MemberReference Resolve (this MemberReference member)
- {
- FieldReference fr = member as FieldReference;
- if (fr != null)
- return fr.Resolve ();
- MethodReference mr = member as MethodReference;
- if (mr != null)
- return mr.Resolve ();
- TypeReference tr = member as TypeReference;
- if (tr != null)
- return tr.Resolve ();
- PropertyReference pr = member as PropertyReference;
- if (pr != null)
- return pr;
- EventReference er = member as EventReference;
- if (er != null)
- return er;
- throw new NotSupportedException ("Cannot find definition for " + member.ToString ());
- }
-
public static TypeReference GetUnderlyingType (this TypeDefinition type)
{
if (!type.IsEnum)
{
HashSet<string> inheritedInterfaces = GetInheritedInterfaces (type);
List<TypeReference> userInterfaces = new List<TypeReference> ();
- foreach (TypeReference iface in type.Interfaces) {
+ foreach (var ii in type.Interfaces) {
+ var iface = ii.InterfaceType;
TypeReference lookup = iface.Resolve () ?? iface;
if (!inheritedInterfaces.Contains (GetQualifiedTypeName (lookup)))
userInterfaces.Add (iface);
Action<TypeDefinition> a = null;
a = t => {
if (t == null) return;
- foreach (TypeReference r in t.Interfaces) {
- inheritedInterfaces.Add (GetQualifiedTypeName (r));
- a (r.Resolve ());
+ foreach (var r in t.Interfaces) {
+ inheritedInterfaces.Add (GetQualifiedTypeName (r.InterfaceType));
+ a (r.InterfaceType.Resolve ());
}
};
TypeReference baseRef = type.BaseType;
else
baseRef = null;
}
- foreach (TypeReference r in type.Interfaces)
- a (r.Resolve ());
+ foreach (var r in type.Interfaces)
+ a (r.InterfaceType.Resolve ());
return inheritedInterfaces;
}
}
{
return e.Name;
}
+
+ public string GetDeclaration (MemberReference mreference)
+ {
+ return GetDeclaration (mreference.Resolve ());
+ }
- public virtual string GetDeclaration (MemberReference member)
+ string GetDeclaration (IMemberDefinition member)
{
if (member == null)
throw new ArgumentNullException ("member");
buf.Append (full.GetName (type.BaseType).Substring ("class ".Length));
}
bool first = true;
- foreach (var name in type.Interfaces.Where (i => MDocUpdater.IsPublic (i.Resolve ()))
- .Select (i => full.GetName (i))
+ foreach (var name in type.Interfaces.Where (i => MDocUpdater.IsPublic (i.InterfaceType.Resolve ()))
+ .Select (i => full.GetName (i.InterfaceType))
.OrderBy (n => n)) {
if (first) {
buf.Append (" implements ");
return buf;
}
- public override string GetDeclaration (MemberReference member)
- {
- TypeReference r = member as TypeReference;
- if (r != null) {
- return "T:" + GetTypeName (r);
- }
- return base.GetDeclaration (member);
- }
-
protected override string GetConstructorName (MethodReference constructor)
{
return GetMethodDefinitionName (constructor, "#ctor");
<Reference Include="System.Xml.Linq" />
<Reference Include="ICSharpCode.SharpZipLib" />
<Reference Include="System.Xml" />
- <Reference Include="Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
<Reference Include="monodoc">
- <HintPath>..\..\class\lib\net_4_5\monodoc.dll</HintPath>
+ <HintPath>..\..\class\lib\net_4_x\monodoc.dll</HintPath>
+ </Reference>
+ <Reference Include="Mono.Cecil">
+ <HintPath>..\..\class\lib\net_4_x\Mono.Cecil.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
if (ilOffset < 0)
return false;
- SequencePoint sp = null;
- foreach (var instr in method.Body.Instructions) {
- if (instr.SequencePoint != null)
- sp = instr.SequencePoint;
-
- if (instr.Offset >= ilOffset) {
+ if (!method.DebugInformation.HasSequencePoints)
+ return false;
+
+ SequencePoint prev = null;
+ foreach (var sp in method.DebugInformation.SequencePoints.OrderBy (l => l.Offset)) {
+ if (sp.Offset >= ilOffset) {
sfData.SetLocation (sp.Document.Url, sp.StartLine);
return true;
}
+
+ prev = sp;
+ }
+
+ if (prev != null) {
+ sfData.SetLocation (prev.Document.Url, prev.StartLine);
+ return true;
}
return false;
$(MONO) $(TEST_EXE) > $(STACKTRACE_FILE); \
$(MONO) $(LIB_PATH)/$(PROGRAM) $(MSYM_DIR) $(STACKTRACE_FILE) > $(SYMBOLICATE_RAW_FILE); \
sed "s/) .* in .*\/mcs\//) in mcs\//" $(SYMBOLICATE_RAW_FILE) | sed '/\[MVID\]/d' | sed '/\[AOTID\]/d' > $(SYMBOLICATE_RESULT_FILE); \
- DIFF=$$(diff $(SYMBOLICATE_RESULT_FILE) $(SYMBOLICATE_EXPECTED_FILE)); \
+ DIFF=$$(diff -up $(SYMBOLICATE_EXPECTED_FILE) $(SYMBOLICATE_RESULT_FILE)); \
if [ ! -z "$$DIFF" ]; then \
echo "Symbolicate tests failed."; \
echo "If $(SYMBOLICATE_RESULT_FILE) is correct copy it to $(SYMBOLICATE_EXPECTED_FILE)."; \
<Compile Include="LocationProvider.cs" />\r
<Compile Include="SeqPointInfo.cs" />\r
<Compile Include="symbolicate.cs" />\r
+ <Compile Include="Logger.cs" />\r
+ <Compile Include="StackFrameData.cs" />\r
+ <Compile Include="StackTraceMetadata.cs" />\r
+ <Compile Include="SymbolManager.cs" />\r
+ <Compile Include="..\..\class\Mono.Options\Mono.Options\Options.cs">\r
+ <Link>Options.cs</Link>\r
+ </Compile>\r
</ItemGroup>\r
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
</Project>
\ No newline at end of file
void CheckInterfaces (TypeDefinition type)
{
- foreach (TypeReference iface in type.Interfaces) {
- if (!IsVisibleFrom (type, iface)) {
+ foreach (var iface in type.Interfaces) {
+ if (!IsVisibleFrom (type, iface.InterfaceType)) {
ReportError ("Interface `{0}` implemented by `{1}` is not visible",
iface, type);
}
TypeDefinition baseType = finalType;
while (baseType != null) {
if (baseType.HasInterfaces)
- foreach (TypeReference @interface in baseType.Interfaces)
- foreach (MethodDefinition method in @interface.Resolve ().Methods)
+ foreach (var @interface in baseType.Interfaces)
+ foreach (MethodDefinition method in @interface.InterfaceType.Resolve ().Methods)
if (method.Name == final.Name && HasSameSignature (method, final))
return method;
static void RemoveInterface (TypeDefinition type, string name)
{
for (int i = 0; i < type.Interfaces.Count; i++) {
- TypeReference iface = type.Interfaces [i];
+ TypeReference iface = type.Interfaces [i].InterfaceType;
if (iface.FullName == name) {
type.Interfaces.RemoveAt (i);
return;
#ifndef _WAPI_PROCESSES_H_
#define _WAPI_PROCESSES_H_
+#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
typedef MonoDomain* (*MonoLoadFunc) (const char *filename, const char *runtime_version);
-void mono_domain_lock (MonoDomain *domain);
-void mono_domain_unlock (MonoDomain *domain);
+void mono_domain_lock (MonoDomain *domain) MONO_LLVM_INTERNAL;
+void mono_domain_unlock (MonoDomain *domain) MONO_LLVM_INTERNAL;
void
mono_install_runtime_load (MonoLoadFunc func);
mono_coop_mutex_lock (ud->mutex);
mono_coop_cond_signal (ud->cond);
mono_coop_mutex_unlock (ud->mutex);
+
+ g_free (ud);
}
/*
static inline gint
coop_cond_timedwait_alertable (MonoCoopCond *cond, MonoCoopMutex *mutex, guint32 timeout_ms, gboolean *alertable)
{
+ BreakCoopAlertableWaitUD *ud;
int res;
if (alertable) {
- BreakCoopAlertableWaitUD ud;
+ ud = g_new0 (BreakCoopAlertableWaitUD, 1);
+ ud->cond = cond;
+ ud->mutex = mutex;
- *alertable = FALSE;
- ud.cond = cond;
- ud.mutex = mutex;
- mono_thread_info_install_interrupt (break_coop_alertable_wait, &ud, alertable);
- if (*alertable)
+ mono_thread_info_install_interrupt (break_coop_alertable_wait, ud, alertable);
+ if (*alertable) {
+ g_free (ud);
return 0;
+ }
}
res = mono_coop_cond_timedwait (cond, mutex, timeout_ms);
if (alertable) {
mono_thread_info_uninstall_interrupt (alertable);
if (*alertable)
return 0;
+ else {
+ /* the interrupt token has not been taken by another
+ * thread, so it's our responsability to free it up. */
+ g_free (ud);
+ }
}
return res;
}
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_stloc (mb, local_delegates);
-
/* if (delegates == null) */
mono_mb_emit_ldloc (mb, local_delegates);
pos2 = mono_mb_emit_branch (mb, CEE_BRTRUE);
#endif /* DISABLE_JIT */
info = mono_wrapper_info_create (mb, subtype);
+ info->d.delegate_invoke.method = method;
if (ctx) {
MonoMethod *def;
MonoMethodSignature *sig;
} GsharedvtWrapperInfo;
+typedef struct {
+ MonoMethod *method;
+} DelegateInvokeWrapperInfo;
+
/*
* This structure contains additional information to uniquely identify a given wrapper
* method. It can be retrieved by mono_marshal_get_wrapper_info () for certain types
RemotingWrapperInfo remoting;
/* GSHAREDVT_IN_SIG/GSHAREDVT_OUT_SIG */
GsharedvtWrapperInfo gsharedvt;
+ /* DELEGATE_INVOKE */
+ DelegateInvokeWrapperInfo delegate_invoke;
} d;
} WrapperInfo;
g_assert (info->client_info.stack_end);
aligned_stack_start = (void*)(mword) ALIGN_TO ((mword)info->client_info.stack_start, SIZEOF_VOID_P);
+#ifdef HOST_WIN32
+ /* Windows uses a guard page before the committed stack memory pages to detect when the
+ stack needs to be grown. If we suspend a thread just after a function prolog has
+ decremented the stack pointer to point into the guard page but before the thread has
+ been able to read or write to that page, starting the stack scan at aligned_stack_start
+ will raise a STATUS_GUARD_PAGE_VIOLATION and the process will crash. This code uses
+ VirtualQuery() to determine whether stack_start points into the guard page and then
+ updates aligned_stack_start to point at the next non-guard page. */
+ MEMORY_BASIC_INFORMATION mem_info;
+ SIZE_T result = VirtualQuery(info->client_info.stack_start, &mem_info, sizeof(mem_info));
+ g_assert (result != 0);
+ if (mem_info.Protect & PAGE_GUARD) {
+ aligned_stack_start = ((char*) mem_info.BaseAddress) + mem_info.RegionSize;
+ }
+#endif
g_assert (info->client_info.suspend_done);
SGEN_LOG (3, "Scanning thread %p, range: %p-%p, size: %zd, pinned=%zd", info, info->client_info.stack_start, info->client_info.stack_end, (char*)info->client_info.stack_end - (char*)info->client_info.stack_start, sgen_get_pinned_count ());
WrapperInfo *info1 = mono_marshal_get_wrapper_info (method);
WrapperInfo *info2 = mono_marshal_get_wrapper_info (m);
- if (info1 && info2 && info1->subtype == info2->subtype && method->klass == m->klass) {
+ if (info1 && info2 && info1->subtype == info2->subtype && info1->d.delegate_invoke.method == info2->d.delegate_invoke.method) {
index = value;
break;
}
#include <string.h>
#ifndef MONO_CROSS_COMPILE
-#ifdef HAVE_ASM_SIGCONTEXT_H
+#ifdef PLATFORM_ANDROID
#include <asm/sigcontext.h>
-#endif /* def HAVE_ASM_SIGCONTEXT_H */
+#endif /* def PLATFORM_ANDROID */
#endif
#ifdef HAVE_UCONTEXT_H
} MonoLLVMFDEInfo;
void
-mono_unwind_decode_llvm_mono_fde (guint8 *fde, int fde_len, guint8 *cie, guint8 *code, MonoLLVMFDEInfo *res);
+mono_unwind_decode_llvm_mono_fde (guint8 *fde, int fde_len, guint8 *cie, guint8 *code, MonoLLVMFDEInfo *res) MONO_LLVM_INTERNAL;
GSList* mono_unwind_get_cie_program (void);
#ifdef TARGET_WIN32
/* Under windows, the default pinvoke calling convention is stdcall */
-#define CALLCONV_IS_STDCALL(sig) ((((sig)->call_convention) == MONO_CALL_STDCALL) || ((sig)->pinvoke && ((sig)->call_convention) == MONO_CALL_DEFAULT) || ((sig)->pinvoke && ((sig)->call_convention) == MONO_CALL_THISCALL))
+#define CALLCONV_IS_STDCALL(sig) ((sig)->pinvoke && ((sig)->call_convention == MONO_CALL_STDCALL || (sig)->call_convention == MONO_CALL_DEFAULT || (sig)->call_convention == MONO_CALL_THISCALL))
#else
-#define CALLCONV_IS_STDCALL(sig) (((sig)->call_convention) == MONO_CALL_STDCALL || ((sig)->pinvoke && ((sig)->call_convention) == MONO_CALL_THISCALL))
+#define CALLCONV_IS_STDCALL(sig) ((sig)->pinvoke && ((sig)->call_convention == MONO_CALL_STDCALL || (sig)->call_convention == MONO_CALL_THISCALL))
#endif
#define X86_IS_CALLEE_SAVED_REG(reg) (((reg) == X86_EBX) || ((reg) == X86_EDI) || ((reg) == X86_ESI))
if (cinfo->vtype_retaddr) {
/* if the function returns a struct on stack, the called method already does a ret $0x4 */
cinfo->callee_stack_pop = 4;
- } else if (CALLCONV_IS_STDCALL (sig) && sig->pinvoke) {
+ } else if (CALLCONV_IS_STDCALL (sig)) {
/* Have to compensate for the stack space popped by the native callee */
cinfo->callee_stack_pop = stack_size;
}
ARM_MOV_REG_REG (code, ARMREG_R0, ARMREG_FP);
/* call */
- // FIXME: AOT
- ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0);
- ARM_B (code, 0);
- if (single_step)
- *(gpointer*)code = debugger_agent_single_step_from_context;
- else
- *(gpointer*)code = debugger_agent_breakpoint_from_context;
- code += 4;
- ARM_BLX_REG (code, ARMREG_IP);
+ if (aot) {
+ if (single_step)
+ ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_JIT_ICALL_ADDR, "debugger_agent_single_step_from_context");
+ else
+ ji = mono_patch_info_list_prepend (ji, code - buf, MONO_PATCH_INFO_JIT_ICALL_ADDR, "debugger_agent_breakpoint_from_context");
+ ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0);
+ ARM_B (code, 0);
+ *(gpointer*)code = NULL;
+ code += 4;
+ ARM_LDR_REG_REG (code, ARMREG_IP, ARMREG_PC, ARMREG_IP);
+ ARM_BLX_REG (code, ARMREG_IP);
+ } else {
+ ARM_LDR_IMM (code, ARMREG_IP, ARMREG_PC, 0);
+ ARM_B (code, 0);
+ if (single_step)
+ *(gpointer*)code = debugger_agent_single_step_from_context;
+ else
+ *(gpointer*)code = debugger_agent_breakpoint_from_context;
+ code += 4;
+ ARM_BLX_REG (code, ARMREG_IP);
+ }
/* we're back; save ctx.eip and ctx.esp into the corresponding regs slots. */
ARM_LDR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, pc));
if (args.Length > 0)
width = Math.Max (width, Int32.Parse (args [0]));
- int depth = 10000;
+ // Windows x64 only has 1 MB of stack per thread which is less than other x86 64-bit OSes.
+ // Using 10000 for depth will cause a stack overflow on Windows x64. 5000 will fit.
+ int platform = (int) Environment.OSVersion.Platform;
+ bool isWin64 = !(platform == 4 || platform == 128) && Environment.Is64BitProcess;
+ int depth = isWin64 ? 5000 : 10000;
if (args.Length > 1)
depth = Math.Max (depth, Int32.Parse (args [1]));
return mono_test_stdcall_name_mangling (0, 1, 2) == 3 ? 0 : 1;
}
+ /* Test multiple calls to stdcall wrapper, xamarin bug 30146 */
+ public static int test_0_stdcall_many_calls () {
+ for (int i=0; i<256; i++)
+ mono_test_stdcall_name_mangling (0, 0, 0);
+ return 0;
+ }
+
/* Float test */
[DllImport ("libtest", EntryPoint="mono_test_marshal_pass_return_float")]
XmlWriterSettings xmlWriterSettings = new XmlWriterSettings ();
xmlWriterSettings.NewLineOnAttributes = true;
xmlWriterSettings.Indent = true;
- using (XmlWriter writer = XmlWriter.Create (String.Format ("TestResult-{0}.xml", testsuiteName), xmlWriterSettings)) {
+
+ string xmlPath = String.Format ("TestResult-{0}.xml", testsuiteName);
+ using (XmlWriter writer = XmlWriter.Create (xmlPath, xmlWriterSettings)) {
// <?xml version="1.0" encoding="utf-8" standalone="no"?>
writer.WriteStartDocument ();
// <!--This file represents the results of running a test suite-->
// </test-results>
writer.WriteEndElement ();
writer.WriteEndDocument ();
+
+ string babysitterXmlList = Environment.GetEnvironmentVariable("MONO_BABYSITTER_NUNIT_XML_LIST_FILE");
+ if (!String.IsNullOrEmpty(babysitterXmlList)) {
+ try {
+ string fullXmlPath = Path.GetFullPath(xmlPath);
+ File.AppendAllText(babysitterXmlList, fullXmlPath + Environment.NewLine);
+ } catch (Exception e) {
+ Console.WriteLine("Attempted to record XML path to file {0} but failed.", babysitterXmlList);
+ }
+ }
}
if (verbose) {
able to unmap memory that may have be allocated using multiple calls
to MMAP, so long as they are adjacent.
-HAVE_MREMAP default: 1 on linux, else 0
+HAVE_MREMAP default: 1 on linux and NetBSD, else 0
If true realloc() uses mremap() to re-allocate large blocks and
extend or shrink allocation spaces.
#define MMAP_CLEARS 1
#endif /* MMAP_CLEARS */
#ifndef HAVE_MREMAP
-#ifdef linux
+#if defined(linux) || defined(__NetBSD__)
#define HAVE_MREMAP 1
-#else /* linux */
+#else /* linux || __NetBSD__ */
#define HAVE_MREMAP 0
-#endif /* linux */
+#endif /* linux || __NetBSD__ */
#endif /* HAVE_MREMAP */
#ifndef MALLOC_FAILURE_ACTION
#define MALLOC_FAILURE_ACTION errno = ENOMEM;
#endif /* HAVE_MMAP */
#if HAVE_MMAP && HAVE_MREMAP
+#if defined(linux)
#define CALL_MREMAP(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv))
+#elif defined(__NetBSD__)
+#define CALL_MREMAP(addr, osz, nsz, mv) mremap((addr), (osz), (addr), (nsz), (mv))
+#else
+#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
+#endif
#else /* HAVE_MMAP && HAVE_MREMAP */
#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
#endif /* HAVE_MMAP && HAVE_MREMAP */
#!/usr/bin/env python
-# Mimics GNU timeout, but does some fancy tracking based on custom features in mono nunit24.
+# Mimics GNU timeout, but has special modes which gather test result data and retry failed tests.
+
+######################################### How this works ##########################################
+#
+# Because we have several different test harnesses and we don't invoke them directly, communication
+# between this script and the harness is done through the simplest means possible (environment
+# variables to communicate babysitter->harness, files in standard locations harness->babysitter).
+#
+# The script supports three different ways of extracting test data from the invoked test suite:
+#
+# 1. "The babysitter protocol": The babysitter sets five environment variables (see below):
+# "Ran test file": A path to a file where the harness should write a line-delimited list of
+# tests which ran to completion.
+# "Failed test file": A path to a file where the harness should write a line-delimited list
+# of tests that failed.
+# "Current test file": A path to a file where the harness should write the currently running
+# test before a test begins, then delete afterward (used to detect early termination).
+# "Run test": A list of test names, used by:
+# "Run mode": This is either RUN or EXCLUDE. If RUN, the test list is a whitelist; run only
+# those tests. If EXCLUDE, the list is a blacklist; run all except those tests.
+# This is the most featureful mode: It can report where we failed in the case of timeouts or
+# crashes that take down the harness, and if the feature is enabled it can retry failed tests.
+# However, it requires modification to the test harness.
+#
+# 2. NUnit XML: The babysitter also sets a sixth environment variable:
+# "XML list file": A path to a file where the harness should write a line-delimited list of
+# paths to NUnit-format XML result files it created.
+# This also requires modification to the test harness, but less of it.
+#
+# 3. NUnit XML (manually specified): If the test harness can't be modified, but the caller of the
+# babysitter script happens to know where the harness writes its result XML files, the caller
+# can specify those paths in the "Extra XML" environment variable (see --help)
+#
+# A single babysitter invocation can currently handle either the babysitter protocol or the XML,
+# but never a mix of the two.
+#
+###################################################################################################
import argparse
import subprocess
import tempfile
import calendar
import json
+from xml.dom.minidom import parse as xmlparse
### Constants
-# Here is how the communication with nunit works. It has to work with two constraints:
-# - We don't invoke nunit directly. We invoke some Makefile which invokes some other Makefile
-# and at some point down the line someone calls nunit.
-# - nunit has to be able to report back to us even if (especially if) it terminates improperly.
-# To deal with all this, communication babysitter->nunit is done by environment variables,
-# and communication nunit->babysitter is done by leaving behind files in known locations.
-
# Filenames
CURRENT_TEST_FILE = "babysitter_report_current_test_file.txt"
RAN_TEST_FILE = "babysitter_report_ran_test_file.txt"
FAILED_TEST_FILE = "babysitter_report_failed_test_file.txt"
+XML_LIST_FILE = "babysitter_report_xml_list_file.txt"
LOGGING_FILE = "babysitter_report.json_lines"
# Environment keys
CURRENT_TEST_KEY = 'MONO_BABYSITTER_NUNIT_CURRENT_TEST_FILE' # Tell nunit where to leave files
RAN_TEST_KEY = 'MONO_BABYSITTER_NUNIT_RAN_TEST_FILE'
FAILED_TEST_KEY = 'MONO_BABYSITTER_NUNIT_FAILED_TEST_FILE'
+XML_LIST_KEY = 'MONO_BABYSITTER_NUNIT_XML_LIST_FILE'
RUN_KEY = 'MONO_BABYSITTER_NUNIT_RUN_TEST' # Semicolon-separated list of test names
-RUN_MODE_KEY = 'MONO_BABYSITTER_NUNIT_RUN_MODE' # Equal to either RUN or AFTER
+RUN_MODE_KEY = 'MONO_BABYSITTER_NUNIT_RUN_MODE' # Equal to either RUN or EXCLUDE
# Keys used for script configuration (see --help text)
LOG_FILE_KEY = 'MONO_BABYSITTER_LOG_FILE' # Path
+EXTRA_XML_KEY = 'MONO_BABYSITTER_EXTRA_XML' # Semicolon-separated list of paths
RETRY_KEY = 'MONO_BABYSITTER_RETRY' # Equal to an integer
VERBOSE_KEY = 'MONO_BABYSITTER_VERBOSE' # "Undocumented"-- used for debugging babysitter
COUNT_JSON = 'iteration' # How many times was command executed?
LIMIT_JSON = 'failure_max'
SUPPORT_JSON = 'babysitter_protocol' # Was the test suite running with a babysitter-aware nunit?
+LOADED_XML_JSON = 'loaded_xml' # True if we loaded result XML from the test suite
FINAL_CODE_JSON = 'final_code'
TESTS_JSON = 'tests' # Holds dictionary of (test case name)->(dict with TEST_ keys below)
TEST_FAILURES = 'normal_failures'
'd' for days\n
supported environment variables:
%s: File to write logs to (as line-delimited JSON)
- %s: If set to a number, failed test cases will be rerun this many times (NUnit test suites only)""" %
- (LOG_FILE_KEY, RETRY_KEY),
+ %s: If set to a number, failed test cases will be rerun this many times (NUnit test suites only)
+ %s: Semicolon-separated list of additional NUnit XMLs to check for errors""" %
+ (LOG_FILE_KEY, RETRY_KEY, EXTRA_XML_KEY),
formatter_class=argparse.RawTextHelpFormatter)
argparser.add_argument('-s', '--signal', dest='signal', metavar='signal', default='TERM',
help="Send this signal to the command on timeout, instead of TERM.")
verbose = VERBOSE_KEY in global_env
logging = LOG_FILE_KEY in global_env
logfile = global_env[LOG_FILE_KEY] if logging else None
+xml_list = global_env[EXTRA_XML_KEY].split(";") if EXTRA_XML_KEY in global_env and global_env[EXTRA_XML_KEY] else []
crash_resuming = True # TODO: Consider exposing this option, or adding a retry_on_crash option.
failmax = int(global_env[RETRY_KEY]) if RETRY_KEY in global_env else 0
babysitting = True # If false, babysitter becomes a timeout clone with no env manipulation or anything.
global_env[CURRENT_TEST_KEY] = os.path.join(babysitter_dir, CURRENT_TEST_FILE)
global_env[RAN_TEST_KEY] = os.path.join(babysitter_dir, RAN_TEST_FILE)
global_env[FAILED_TEST_KEY] = os.path.join(babysitter_dir, FAILED_TEST_FILE)
+ global_env[XML_LIST_KEY] = os.path.join(babysitter_dir, XML_LIST_FILE)
have_unix_process_groups = 'killpg' in os.__dict__
have_windows_process_groups = 'CREATE_NEW_PROCESS_GROUP' in subprocess.__dict__
# Set up logging
log = {DATE_JSON: posixtime(), COUNT_JSON:0, LIMIT_JSON:failmax, SUPPORT_JSON:False,
- INVOKE_JSON: " ".join(command)}
+ LOADED_XML_JSON:False, INVOKE_JSON: " ".join(command)}
def log_value(key, set=None, add=None, target=log): # Call to add toplevel value to log
if add is not None:
# Prepare environment/filesystem
if babysitting:
- for key in [CURRENT_TEST_KEY, RAN_TEST_KEY, FAILED_TEST_KEY]:
+ for key in [CURRENT_TEST_KEY, RAN_TEST_KEY, FAILED_TEST_KEY, XML_LIST_KEY]:
attemptDelete(env[key])
if resume_after:
env[RUN_KEY] = ";".join(resume_after)
crashed_at = attemptFirstLine(env[CURRENT_TEST_KEY])
failed_tests = attemptLines(env[FAILED_TEST_KEY])
ran_tests = attemptLines(env[RAN_TEST_KEY])
+ wrote_xml = attemptLines(env[XML_LIST_KEY])
bailout = False
if crashed_at or failed_tests or ran_tests: # Test suite follows the babysitter protocol
message += " Test suite terminated with code %d, " % (code)
if log[SUPPORT_JSON]:
message += "but failure did not occur during a test case. Halting."
+ elif xml_list or wrote_xml:
+ message += "will extract test results from XML. Halting."
else:
message += "and suite cannot report test case data. Halting."
elif bailout:
message += " Will halt testing."
print(message)
+ if not log[SUPPORT_JSON]:
+ for xml in (xml_list + wrote_xml):
+ verbose_print("Will attempt to load XML from %s" % (xml))
+ try:
+ data = xmlparse(xml).documentElement
+ if data.nodeName != 'test-results':
+ raise ValueError("Toplevel element was not <test-results />")
+
+ log_value(LOADED_XML_JSON, True)
+
+ search = [data]
+ while search:
+ nextsearch = []
+ for node in search:
+ for child in node.childNodes:
+ if child.nodeName == 'test-suite' or child.nodeName == 'results':
+ nextsearch.append(child) # Descend
+ elif child.nodeName == 'test-case':
+ name = child.getAttribute("name")
+ if child.getAttribute("executed") == "True" and child.getAttribute("success") != "True":
+ log_test(name, TEST_FAILURES, add=1)
+
+ search = nextsearch
+ except Exception as e:
+ print("Could not load XML file %s. Reason: %s" % (xml, e))
+ data
+
if bailout or not (resume_after or retry_next): # If not retrying
return code
if [[ ${label} == 'w32' ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\build\\\sgen\\\Win32\\\bin\\\Release\\\mono-sgen.exe`"; fi
if [[ ${label} == 'w64' ]]; then PLATFORM=x64; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=x86_64-w64-mingw32 --disable-boehm"; export MONO_EXECUTABLE="`cygpath -u ${WORKSPACE}\\\msvc\\\build\\\sgen\\\x64\\\bin\\\Release\\\mono-sgen.exe`"; fi
-if [[ ${CI_TAGS} == 'mobile_static' ]];
+if [[ ${CI_TAGS} == *'mobile_static'* ]];
then
EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime_preset=mobile_static";
-elif [[ ${CI_TAGS} == 'acceptance-tests' ]];
+elif [[ ${CI_TAGS} == *'acceptance-tests'* ]];
then
EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --prefix=${WORKSPACE}/tmp/mono-acceptance-tests --with-sgen-default-concurrent=yes";
-elif [[ ${label} != w* ]] && [[ ${label} != 'debian-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]];
+elif [[ ${label} != w* ]] && [[ ${label} != 'debian-ppc64el' ]] && [[ ${label} != 'centos-s390x' ]] && [[ ${CI_TAGS} != *'monolite'* ]];
then
# Override the defaults to skip profiles
# only enable the mobile profiles and mobile_static on the main architectures
then
${TESTCMD} --label=make-msvc-sgen --timeout=60m --fatal /cygdrive/c/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe /p:PlatformToolset=v140 /p:Platform=${PLATFORM} /p:Configuration=Release /p:MONO_TARGET_GC=sgen msvc/mono.sln
fi
-${TESTCMD} --label=make --timeout=300m --fatal make -w V=1
+
+if [[ ${CI_TAGS} == *'monolite'* ]]; then make get-monolite-latest; fi
+
+${TESTCMD} --label=make --timeout=300m --fatal make -j4 -w V=1
if [[ -n "${ghprbPullId}" ]] && [[ ${label} == w* ]];
then
exit 0
# we don't run the test suite on Windows PRs, we just ensure the build succeeds, so end here
fi
-if [[ ${CI_TAGS} == 'acceptance-tests' ]];
+if [[ ${CI_TAGS} == *'acceptance-tests'* ]];
then $(dirname "${BASH_SOURCE[0]}")/run-test-acceptance-tests.sh
else make check-ci
fi
\ No newline at end of file
int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r)
{
*r = 0;
+#ifndef __NetBSD__
if ((x & Mono_Posix_MremapFlags_MREMAP_MAYMOVE) == Mono_Posix_MremapFlags_MREMAP_MAYMOVE)
#ifdef MREMAP_MAYMOVE
*r |= MREMAP_MAYMOVE;
#else /* def MREMAP_MAYMOVE */
{errno = EINVAL; return -1;}
#endif /* ndef MREMAP_MAYMOVE */
+#else /* def __NetBSD__ */
+ if ((x & Mono_Posix_MremapFlags_MREMAP_MAYMOVE) != Mono_Posix_MremapFlags_MREMAP_MAYMOVE)
+ *r = MAP_FIXED;
+#endif /* def __NetBSD__ */
if (x == 0)
return 0;
return 0;
int Mono_Posix_ToMremapFlags (guint64 x, guint64 *r)
{
*r = 0;
+#ifndef __NetBSD__
if (x == 0)
return 0;
#ifdef MREMAP_MAYMOVE
if ((x & MREMAP_MAYMOVE) == MREMAP_MAYMOVE)
*r |= Mono_Posix_MremapFlags_MREMAP_MAYMOVE;
#endif /* ndef MREMAP_MAYMOVE */
+#else /* def __NetBSD__ */
+ if ((x & MAP_FIXED) != MAP_FIXED)
+ *r |= Mono_Posix_MremapFlags_MREMAP_MAYMOVE;
+#endif
return 0;
}
#endif /* ndef XATTR_REPLACE */
return 0;
}
-
if (Mono_Posix_FromMremapFlags (flags, &_flags) == -1)
return MAP_FAILED;
+#if defined(linux)
return mremap (old_address, (size_t) old_size, (size_t) new_size,
(unsigned long) _flags);
+#elif defined(__NetBSD__)
+ return mremap (old_address, (size_t) old_size, old_address,
+ (size_t) new_size, (unsigned long) _flags);
+#else
+#error Port me
+#endif
}
#endif /* def HAVE_MREMAP */