[Debugger] Update MDS to the latest in mono trunk, it has a bunch of fixes we need, and use Mono.Cecil 0.9
This commit is contained in:
Родитель
318a8c16ca
Коммит
d884ede49e
|
@ -0,0 +1,39 @@
|
|||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Zoltan Varga (vargaz@gmail.com)
|
||||
//
|
||||
// (C) 2011 Novell (http://www.novell.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
|
||||
[assembly: AssemblyTitle("Mono.Debugger.Soft.dll")]
|
||||
[assembly: AssemblyDescription("Mono Soft Debugger API library")]
|
|
@ -0,0 +1,114 @@
|
|||
//
|
||||
// Consts.cs.in
|
||||
//
|
||||
// Author:
|
||||
// Kornél Pál <http://www.kornelpal.hu/>
|
||||
//
|
||||
// Copyright (C) 2005-2006 Kornél Pál
|
||||
//
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
static class Consts
|
||||
{
|
||||
|
||||
#if NET_4_5
|
||||
public const string FxVersion = "4.0.0.0";
|
||||
public const string FxFileVersion = "4.0.30319.17020";
|
||||
|
||||
public const string VsVersion = "0.0.0.0"; // Useless ?
|
||||
public const string VsFileVersion = "11.0.0.0"; // TODO:
|
||||
#elif NET_4_0
|
||||
public const string FxVersion = "4.0.0.0";
|
||||
public const string FxFileVersion = "4.0.30319.1";
|
||||
|
||||
public const string VsVersion = "0.0.0.0"; // Useless ?
|
||||
public const string VsFileVersion = "10.0.0.0"; // TODO:
|
||||
#elif NET_3_5
|
||||
// Versions of .NET Framework 3.5 RTM
|
||||
public const string FxVersion = "3.5.0.0";
|
||||
public const string FxFileVersion = "3.5.21022.8";
|
||||
|
||||
public const string VsVersion = "0.0.0.0"; // Useless ?
|
||||
#elif NET_3_0
|
||||
public const string FxVersion = "3.0.0.0";
|
||||
public const string VsVersion = "8.0.0.0";
|
||||
public const string FxFileVersion = "3.0.4506.648";
|
||||
public const string VsFileVersion = "6.0.6001.17014";
|
||||
#elif NET_2_1
|
||||
// Versions of .NET Framework for Silverlight 4.0
|
||||
public const string FxVersion = "2.0.5.0";
|
||||
public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
|
||||
public const string FxFileVersion = "4.0.50524.0";
|
||||
public const string VsFileVersion = "9.0.50727.42"; // unused, but needed for compilation
|
||||
#elif NET_2_0
|
||||
// Versions of .NET Framework 2.0 RTM
|
||||
public const string FxVersion = "2.0.0.0";
|
||||
public const string VsVersion = "8.0.0.0";
|
||||
public const string FxFileVersion = "2.0.50727.1433";
|
||||
public const string VsFileVersion = "8.0.50727.1433";
|
||||
#elif NET_1_1
|
||||
#error Profile NET_1_1 is not supported.
|
||||
#elif NET_1_0
|
||||
#error Profile NET_1_0 is not supported.
|
||||
#else
|
||||
#error No profile symbols defined.
|
||||
#endif
|
||||
|
||||
//
|
||||
// Use these assembly name constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string AssemblyI18N = "I18N, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
|
||||
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblyMono_Http = "Mono.Http, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
|
||||
public const string AssemblyMono_Posix = "Mono.Posix, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
|
||||
public const string AssemblyMono_Security = "Mono.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
|
||||
public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
|
||||
public const string AssemblyCorlib = "mscorlib, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystem = "System, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystem_Data = "System.Data, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystem_Design = "System.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Drawing = "System.Drawing, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Drawing_Design = "System.Drawing.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Messaging = "System.Messaging, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Security = "System.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#if NET_4_0
|
||||
public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
|
||||
#elif NET_2_1
|
||||
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#elif NET_2_0
|
||||
public const string AssemblySystem_Core = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
//
|
||||
// Locale.cs
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza (miguel@ximian.com)
|
||||
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
|
||||
//
|
||||
// (C) 2001 - 2003 Ximian, Inc (http://www.ximian.com)
|
||||
//
|
||||
|
||||
//
|
||||
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
internal sealed class Locale {
|
||||
|
||||
private Locale ()
|
||||
{
|
||||
}
|
||||
|
||||
public static string GetText (string msg)
|
||||
{
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static string GetText (string fmt, params object [] args)
|
||||
{
|
||||
return String.Format (fmt, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{155AEF28-C81F-405D-9072-9D52780E3E70}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<OutputPath>./../../class/lib/net_4_0</OutputPath>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace></RootNamespace>
|
||||
<AssemblyName>Mono.Debugger.Soft</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<!-- Filter out System.Core added by: Microsoft.NETFramework.props -->
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include=".\Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeTypedArgumentMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ExceptionEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ModuleMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMStartEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StackFrame.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeDataMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadStartEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ILExceptionHandler.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Mirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\FieldInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeNamedArgumentMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\DataConverter.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachine.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMMismatchException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ExceptionEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventType.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StructMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvocationException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodBodyMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodEntryEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodEntryEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyLoadEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\LocalVariable.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ParameterInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Event.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventSet.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainCreateEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\SuspendPolicy.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachineManager.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodExitEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodExitEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventQueueImpl.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ObjectMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Value.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Location.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ObjectCollectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvalidStackFrameException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StringMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PropertyInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ArrayMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Connection.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeLoadEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDisconnectEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvokeOptions.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IInvokeAsyncResult.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ITargetProcess.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AbsentInformationException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\UserBreakEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\UserLogEvent.cs" />
|
||||
|
||||
</ItemGroup>
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent></PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.Core.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{155AEF28-C81F-405D-9072-9D52780E3E70}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<OutputPath>./../../class/lib/net_4_5</OutputPath>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace></RootNamespace>
|
||||
<AssemblyName>Mono.Debugger.Soft</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<!-- Filter out System.Core added by: Microsoft.NETFramework.props -->
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_5</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_5</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include=".\Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeTypedArgumentMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ExceptionEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ModuleMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMStartEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StackFrame.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeDataMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadStartEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ILExceptionHandler.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Mirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\FieldInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeNamedArgumentMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\DataConverter.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachine.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMMismatchException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ExceptionEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventType.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StructMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvocationException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodBodyMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodEntryEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodEntryEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyLoadEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\LocalVariable.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ParameterInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Event.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventSet.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainCreateEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\SuspendPolicy.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachineManager.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodExitEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodExitEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventQueueImpl.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ObjectMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Value.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Location.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ObjectCollectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvalidStackFrameException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StringMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PropertyInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ArrayMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Connection.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeLoadEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDisconnectEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvokeOptions.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IInvokeAsyncResult.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ITargetProcess.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AbsentInformationException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\UserBreakEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\UserLogEvent.cs" />
|
||||
|
||||
</ItemGroup>
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent></PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.Core.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{155AEF28-C81F-405D-9072-9D52780E3E70}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<OutputPath>.\</OutputPath>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace></RootNamespace>
|
||||
<AssemblyName>Mono.Debugger.Soft_test_net_4_0</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<!-- Filter out System.Core added by: Microsoft.NETFramework.props -->
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="Test\dtest.cs" />
|
||||
|
||||
</ItemGroup>
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent></PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="./../../class/lib/net_4_0/Mono.Debugger.Soft.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>./../../class/lib/net_4_0/Mono.Debugger.Soft.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework" />
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{155AEF28-C81F-405D-9072-9D52780E3E70}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<OutputPath>.\</OutputPath>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace></RootNamespace>
|
||||
<AssemblyName>Mono.Debugger.Soft_test_net_4_5</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<!-- Filter out System.Core added by: Microsoft.NETFramework.props -->
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_5</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_4_5</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="Test\dtest.cs" />
|
||||
|
||||
</ItemGroup>
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent></PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="./../../class/lib/net_4_5/Mono.Debugger.Soft.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>./../../class/lib/net_4_5/Mono.Debugger.Soft.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework" />
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{155AEF28-C81F-405D-9072-9D52780E3E70}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<OutputPath>.\</OutputPath>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace></RootNamespace>
|
||||
<AssemblyName>Mono.Debugger.Soft_test_net_2_0</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<!-- Filter out System.Core added by: Microsoft.NETFramework.props -->
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_2_0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_1_1;NET_2_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>./../../class/lib/net_2_0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="Test\dtest.cs" />
|
||||
|
||||
</ItemGroup>
|
||||
<!-- 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>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent></PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="./../../class/lib/net_2_0/Mono.Debugger.Soft.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>./../../class/lib/net_2_0/Mono.Debugger.Soft.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework" />
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -7,114 +7,117 @@
|
|||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{F2D07F82-9C51-4889-8987-4CEF47490751}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Mono.Debugger.Soft</RootNamespace>
|
||||
<AssemblyName>Mono.Debugger.Soft</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<!-- Filter out System.Core added by: Microsoft.NETFramework.props -->
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
|
||||
<DefineConstants>DEBUG;TRACE;NET_1_1;NET_2_0;MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AdditionalLibPaths>..\..\..\..\External\Mono\builds\monodistribution\lib\mono\2.0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;MONO_DATACONVERTER_STATIC_METHODS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AdditionalLibPaths>..\..\..\..\External\Mono\builds\monodistribution\lib\mono\2.0</AdditionalLibPaths>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Cecil">
|
||||
<HintPath>..\..\..\..\External\Mono\builds\monodistribution\lib\mono\2.0\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Mono.Debugger.Soft\AbsentInformationException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainCreateEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ArrayMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Connection.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeDataMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeNamedArgumentMirror.cs" />
|
||||
<Compile Include="Assembly\AssemblyInfo.cs" />
|
||||
<Compile Include="Assembly\Consts.cs" />
|
||||
<Compile Include="Assembly\Locale.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeTypedArgumentMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\DataConverter.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Event.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventQueueImpl.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventType.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ExceptionEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ExceptionEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\FieldInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IInvokeAsyncResult.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ModuleMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMStartEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StackFrame.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeDataMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadStartEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ILInstruction.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvalidStackFrameException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ILExceptionHandler.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InterfaceMappingMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PointerValue.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Mirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EnumMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\FieldInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\CustomAttributeNamedArgumentMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\DataConverter.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachine.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMMismatchException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainUnloadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ExceptionEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventType.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StructMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvocationException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvokeOptions.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ITargetProcess.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\LocalVariable.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Location.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodBodyMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodEntryEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodEntryEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AssemblyLoadEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\LocalVariable.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ParameterInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Event.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventSet.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AppDomainCreateEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\SuspendPolicy.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachineManager.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodExitEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodExitEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\MethodMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Mirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ModuleMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ObjectCollectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventQueueImpl.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ObjectMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ParameterInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PrimitiveValue.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PropertyInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StackFrame.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StringMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StructMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\SuspendPolicy.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadStartEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Value.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachine.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VirtualMachineManager.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDeathEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDisconnectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Location.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ObjectCollectedException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\EventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvalidStackFrameException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\BreakpointEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StringMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\PropertyInfoMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ArrayMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\StepEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\Connection.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ThreadMirror.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeLoadEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\TypeLoadEventRequest.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMDisconnectEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMMismatchException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\VMStartEvent.cs" />
|
||||
<None Include="Mono.Debugger\VirtualMachine.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\InvokeOptions.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\IInvokeAsyncResult.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\ITargetProcess.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\AbsentInformationException.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\UserBreakEvent.cs" />
|
||||
<Compile Include="Mono.Debugger.Soft\UserLogEvent.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.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">
|
||||
|
@ -122,4 +125,31 @@
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>mscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Cecil.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\Tools\Mono.Cecil\Mono.Cecil.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core.dll">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>System.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,75 @@
|
|||
./Assembly/AssemblyInfo.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
Mono.Debugger.Soft/CustomAttributeTypedArgumentMirror.cs
|
||||
Mono.Debugger.Soft/ExceptionEvent.cs
|
||||
Mono.Debugger.Soft/ModuleMirror.cs
|
||||
Mono.Debugger.Soft/AppDomainMirror.cs
|
||||
Mono.Debugger.Soft/AssemblyLoadEvent.cs
|
||||
Mono.Debugger.Soft/AssemblyUnloadEvent.cs
|
||||
Mono.Debugger.Soft/VMStartEvent.cs
|
||||
Mono.Debugger.Soft/StackFrame.cs
|
||||
Mono.Debugger.Soft/CustomAttributeDataMirror.cs
|
||||
Mono.Debugger.Soft/ThreadStartEvent.cs
|
||||
Mono.Debugger.Soft/ILInstruction.cs
|
||||
Mono.Debugger.Soft/ILExceptionHandler.cs
|
||||
Mono.Debugger.Soft/InterfaceMappingMirror.cs
|
||||
Mono.Debugger.Soft/PrimitiveValue.cs
|
||||
Mono.Debugger.Soft/PointerValue.cs
|
||||
Mono.Debugger.Soft/VMDisconnectedException.cs
|
||||
Mono.Debugger.Soft/Mirror.cs
|
||||
Mono.Debugger.Soft/EnumMirror.cs
|
||||
Mono.Debugger.Soft/FieldInfoMirror.cs
|
||||
Mono.Debugger.Soft/TypeMirror.cs
|
||||
Mono.Debugger.Soft/CustomAttributeNamedArgumentMirror.cs
|
||||
Mono.Debugger.Soft/DataConverter.cs
|
||||
Mono.Debugger.Soft/AssemblyMirror.cs
|
||||
Mono.Debugger.Soft/VirtualMachine.cs
|
||||
Mono.Debugger.Soft/VMMismatchException.cs
|
||||
Mono.Debugger.Soft/AppDomainUnloadEvent.cs
|
||||
Mono.Debugger.Soft/ExceptionEventRequest.cs
|
||||
Mono.Debugger.Soft/EventType.cs
|
||||
Mono.Debugger.Soft/StructMirror.cs
|
||||
Mono.Debugger.Soft/InvocationException.cs
|
||||
Mono.Debugger.Soft/IMirror.cs
|
||||
Mono.Debugger.Soft/VMDeathEvent.cs
|
||||
Mono.Debugger.Soft/MethodBodyMirror.cs
|
||||
Mono.Debugger.Soft/MethodEntryEvent.cs
|
||||
Mono.Debugger.Soft/MethodMirror.cs
|
||||
Mono.Debugger.Soft/BreakpointEventRequest.cs
|
||||
Mono.Debugger.Soft/MethodEntryEventRequest.cs
|
||||
Mono.Debugger.Soft/AssemblyLoadEventRequest.cs
|
||||
Mono.Debugger.Soft/LocalVariable.cs
|
||||
Mono.Debugger.Soft/ParameterInfoMirror.cs
|
||||
Mono.Debugger.Soft/Event.cs
|
||||
Mono.Debugger.Soft/EventSet.cs
|
||||
Mono.Debugger.Soft/AppDomainCreateEvent.cs
|
||||
Mono.Debugger.Soft/ThreadDeathEvent.cs
|
||||
Mono.Debugger.Soft/SuspendPolicy.cs
|
||||
Mono.Debugger.Soft/VirtualMachineManager.cs
|
||||
Mono.Debugger.Soft/MethodExitEvent.cs
|
||||
Mono.Debugger.Soft/MethodExitEventRequest.cs
|
||||
Mono.Debugger.Soft/EventQueueImpl.cs
|
||||
Mono.Debugger.Soft/ObjectMirror.cs
|
||||
Mono.Debugger.Soft/Value.cs
|
||||
Mono.Debugger.Soft/StepEvent.cs
|
||||
Mono.Debugger.Soft/Location.cs
|
||||
Mono.Debugger.Soft/ObjectCollectedException.cs
|
||||
Mono.Debugger.Soft/EventRequest.cs
|
||||
Mono.Debugger.Soft/InvalidStackFrameException.cs
|
||||
Mono.Debugger.Soft/BreakpointEvent.cs
|
||||
Mono.Debugger.Soft/StringMirror.cs
|
||||
Mono.Debugger.Soft/PropertyInfoMirror.cs
|
||||
Mono.Debugger.Soft/ArrayMirror.cs
|
||||
Mono.Debugger.Soft/StepEventRequest.cs
|
||||
Mono.Debugger.Soft/Connection.cs
|
||||
Mono.Debugger.Soft/ThreadMirror.cs
|
||||
Mono.Debugger.Soft/TypeLoadEvent.cs
|
||||
Mono.Debugger.Soft/TypeLoadEventRequest.cs
|
||||
Mono.Debugger.Soft/VMDisconnectEvent.cs
|
||||
Mono.Debugger.Soft/InvokeOptions.cs
|
||||
Mono.Debugger.Soft/IInvokeAsyncResult.cs
|
||||
Mono.Debugger.Soft/ITargetProcess.cs
|
||||
Mono.Debugger.Soft/AbsentInformationException.cs
|
||||
Mono.Debugger.Soft/UserBreakEvent.cs
|
||||
Mono.Debugger.Soft/UserLogEvent.cs
|
|
@ -13,6 +13,9 @@ namespace Mono.Debugger.Soft
|
|||
internal ArrayMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
|
||||
internal ArrayMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) {
|
||||
}
|
||||
|
||||
public int Length {
|
||||
get {
|
||||
GetLengths ();
|
||||
|
|
11
external/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEventRequest.cs
поставляемый
Normal file
11
external/Mono.Debugger.Soft/Mono.Debugger.Soft/AssemblyLoadEventRequest.cs
поставляемый
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public sealed class AssemblyLoadEventRequest : EventRequest {
|
||||
internal AssemblyLoadEventRequest (VirtualMachine vm) : base (vm, EventType.AssemblyLoad) {
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,207 +1,210 @@
|
|||
2010-06-04 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* StackFrame.cs (GetVisibleVariables): New method to return the set of variables
|
||||
visible at the current stack frame.
|
||||
|
||||
2010-05-24 Martin Baulig <martin@ximian.com>
|
||||
|
||||
* Connection.cs (VersionInfo): Make this public.
|
||||
|
||||
* VirtualMachine.cs (Version): New public property.
|
||||
|
||||
2010-05-07 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs (ErrorHandler): Convert ABSENT_INFORMATION to
|
||||
AbsentInformationException.
|
||||
|
||||
* AbsentInformationException.cs: New file.
|
||||
|
||||
2010-04-30 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* TypeMirror.cs: Add new overload for GetSourceFiles () which returns full paths.
|
||||
|
||||
2010-04-27 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* ITargetProcess.cs:
|
||||
* VirtualMachine.cs:
|
||||
* VirtualMachineManager.cs:
|
||||
Restored old API. Renamed IProcess to ITargetProcess everywhere
|
||||
to avoid naming conflicts.
|
||||
|
||||
2010-04-26 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* IProcess.cs:
|
||||
* VirtualMachine.cs:
|
||||
* VirtualMachineManager.cs:
|
||||
Added new IProcess interface which wraps the debugged process.
|
||||
This abstraction makes it easier to support debugging processes
|
||||
for which we don't have a direct Process reference (for example,
|
||||
if the process is remote).
|
||||
|
||||
2010-04-10 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* ThreadMirror.cs: Add a ThreadId property.
|
||||
|
||||
2010-03-05 Martin Baulig <martin@ximian.com>
|
||||
|
||||
**** Backport of r153125 and r153336 ****
|
||||
|
||||
Add support for aborting invocations.
|
||||
|
||||
* IInvokeAsyncResult.cs: New file.
|
||||
(IInvokeAsyncResult): New public interface; derives from
|
||||
`IAsyncResult' and contains an Abort() method.
|
||||
|
||||
* Connection.cs
|
||||
(Connection.VM_BeginInvokeMethod): Return the `id'.
|
||||
(Connection.VM_AbortInvoke): New method.
|
||||
|
||||
* ObjectMirror.cs
|
||||
(ObjectMirror.AbortInvoke): New internal static method.
|
||||
|
||||
2010-03-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs: Allow working with runtimes implementing a different
|
||||
minor version of the debugger protocol.
|
||||
|
||||
2010-03-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Connection.cs: Send the protocol version used by the client to the debuggee
|
||||
after the handshake.
|
||||
|
||||
2010-03-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Location.cs: Implement ToString ().
|
||||
|
||||
* AppDomainMirror.cs (CreateBoxedValue): New method to create a boxed value from
|
||||
a primitive value or struct.
|
||||
|
||||
2010-02-26 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Connection.cs: Throw a NotSupportedException if the protocol version doesn't
|
||||
support the caught/uncaught flags in an exception modifier.
|
||||
|
||||
2010-02-20 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs (CreateExceptionRequest): Add an overload taking two
|
||||
booleans which specify whenever to report caught/uncaught exceptions.
|
||||
|
||||
* ExceptionRequest.cs: Add public properties for them.
|
||||
|
||||
* Connections.cs: Pass the caught/uncaught flags to the debuggee. Bump protocol
|
||||
minor version.
|
||||
|
||||
2010-02-11 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* AssemblyMirror.cs: Add missing GetType () overloads.
|
||||
|
||||
2010-02-04 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* TypeMirror.cs (EnumUnderlyingType): New property.
|
||||
|
||||
* EnumMirror.cs: Use it.
|
||||
|
||||
* VirtualMachine.cs (CreateEnumMirror): New method to create an EnumMirror.
|
||||
|
||||
* AppDomainMirror.cs (GetCorrespondingType): New method to return a TypeMirror
|
||||
corresponding to a primitive type.
|
||||
|
||||
* TypeMirror.cs (IsEnum): Implement.
|
||||
|
||||
* EnumMirror.cs (.ctor): New internal constructor called from CreateEnumMirror
|
||||
which does lots of error checking.
|
||||
|
||||
2010-01-28 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* AssemblyUnloadEvent: New file.
|
||||
|
||||
* VirtualMachine.cs Connection.cs: Add support for assembly unload events.
|
||||
|
||||
2009-12-05 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* StructMirror.cs: Fix field indexer for structs with static fields.
|
||||
* VirtualMachineManager.cs: Added an option to LaunchOptions which
|
||||
allows providing a custom method for launching the process. This
|
||||
allows launching mono in a wrapper process.
|
||||
|
||||
2009-12-03 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* StructMirror.cs (this): Ignore static fields.
|
||||
|
||||
2009-12-02 Geoff Norton <gnorton@novell.com>
|
||||
|
||||
* VirtualMachineManager.cs: We might get a SocketException (interrupted)
|
||||
here, so lets just handle all Exceptions to our Accept pattern the same
|
||||
way
|
||||
|
||||
2009-12-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs (ErrorHandler): Handle NOT_SUSPENDED error code too.
|
||||
|
||||
2009-11-24 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* ObjectMirror.cs TypeMirror.cs StructMirror.cs: Make the BeginInvokeMethod
|
||||
which takes a 'vm' argument obsolete, it was added by mistake, add a version
|
||||
without that argument instead.
|
||||
|
||||
2009-11-19 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* AssemblyMirror.cs: Add a GetName () method.
|
||||
|
||||
2009-11-17 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Connection.cs ObjectMirror.cs: Implement invokes in a real asynchronous way,
|
||||
without waiting.
|
||||
|
||||
2009-11-14 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* InvokeOptions.cs: Add SingleThreaded option, not yet works.
|
||||
|
||||
* VirtualMachineManager.cs (Launch): Pass options to BeginLaunch.
|
||||
|
||||
* ObjectMirror.cs TypeMirror.cs StructMirror.cs: Implement an async version of
|
||||
InvokeMethod ().
|
||||
|
||||
2009-11-13 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* InvokeOptions.cs: New file.
|
||||
|
||||
* ObjectMirror.cs TypeMirror.cs StructMirror.cs: Add support for passing flags
|
||||
to InvokeMethod ().
|
||||
|
||||
* Connection.cs: Bump protocol version.
|
||||
|
||||
2009-11-12 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachineManager.cs: Put back the old Launch (string[], LaunchOptions)
|
||||
overload.
|
||||
|
||||
2009-11-11 Geoff Norton <gnorton@novell.com>
|
||||
|
||||
* VirtualMachineManager.cs: Refactor the APIs to have async methods.
|
||||
Remove a bunch of Listen overloads that are pointless. Refactor
|
||||
Launch to take a ProcessStartInfo instead of string arguments.
|
||||
|
||||
2009-11-10 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachineManager.cs (Launch): Close the listening socket instead of
|
||||
shutting it down since Shutdown throws on exception on non-connected sockets
|
||||
in ms.net.
|
||||
|
||||
2009-11-05 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachineManager.cs (Listen): Resurrect the old listen method.
|
||||
|
||||
* VirtualMachineManager.cs (Connect): New method to connect to a runtime
|
||||
listening at the provided address.
|
||||
|
||||
2009-11-04 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* VirtualMachineManager.cs: Properly redirect standard output.
|
||||
|
||||
2009-11-03 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* EventRequest.cs (AssemblyFilter): New property to filter
|
||||
events based on a list of assemblies.
|
||||
|
||||
* Connection.cs: Add assembly filters to the protocol implementation.
|
||||
2010-06-17 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs Connection.cs: Group events received together into an EventSet,
|
||||
like it is done in JDI. Add a GetNextEventSet () method.
|
||||
|
||||
2010-06-04 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* StackFrame.cs (GetVisibleVariables): New method to return the set of variables
|
||||
visible at the current stack frame.
|
||||
|
||||
2010-05-24 Martin Baulig <martin@ximian.com>
|
||||
|
||||
* Connection.cs (VersionInfo): Make this public.
|
||||
|
||||
* VirtualMachine.cs (Version): New public property.
|
||||
|
||||
2010-05-07 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs (ErrorHandler): Convert ABSENT_INFORMATION to
|
||||
AbsentInformationException.
|
||||
|
||||
* AbsentInformationException.cs: New file.
|
||||
|
||||
2010-04-30 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* TypeMirror.cs: Add new overload for GetSourceFiles () which returns full paths.
|
||||
|
||||
2010-04-27 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* ITargetProcess.cs:
|
||||
* VirtualMachine.cs:
|
||||
* VirtualMachineManager.cs:
|
||||
Restored old API. Renamed IProcess to ITargetProcess everywhere
|
||||
to avoid naming conflicts.
|
||||
|
||||
2010-04-26 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* IProcess.cs:
|
||||
* VirtualMachine.cs:
|
||||
* VirtualMachineManager.cs:
|
||||
Added new IProcess interface which wraps the debugged process.
|
||||
This abstraction makes it easier to support debugging processes
|
||||
for which we don't have a direct Process reference (for example,
|
||||
if the process is remote).
|
||||
|
||||
2010-04-10 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* ThreadMirror.cs: Add a ThreadId property.
|
||||
|
||||
2010-03-05 Martin Baulig <martin@ximian.com>
|
||||
|
||||
Add support for aborting invocations.
|
||||
|
||||
* IInvokeAsyncResult.cs: New file.
|
||||
(IInvokeAsyncResult): New public interface; derives from
|
||||
`IAsyncResult' and contains an Abort() method.
|
||||
|
||||
* Connection.cs
|
||||
(Connection.VM_BeginInvokeMethod): Return the `id'.
|
||||
(Connection.VM_AbortInvoke): New method.
|
||||
|
||||
* ObjectMirror.cs
|
||||
(ObjectMirror.AbortInvoke): New internal static method.
|
||||
|
||||
2010-03-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs: Allow working with runtimes implementing a different
|
||||
minor version of the debugger protocol.
|
||||
|
||||
2010-03-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Connection.cs: Send the protocol version used by the client to the debuggee
|
||||
after the handshake.
|
||||
|
||||
2010-03-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Location.cs: Implement ToString ().
|
||||
|
||||
* AppDomainMirror.cs (CreateBoxedValue): New method to create a boxed value from
|
||||
a primitive value or struct.
|
||||
|
||||
2010-02-26 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Connection.cs: Throw a NotSupportedException if the protocol version doesn't
|
||||
support the caught/uncaught flags in an exception modifier.
|
||||
|
||||
2010-02-20 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs (CreateExceptionRequest): Add an overload taking two
|
||||
booleans which specify whenever to report caught/uncaught exceptions.
|
||||
|
||||
* ExceptionRequest.cs: Add public properties for them.
|
||||
|
||||
* Connections.cs: Pass the caught/uncaught flags to the debuggee. Bump protocol
|
||||
minor version.
|
||||
|
||||
2010-02-11 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* AssemblyMirror.cs: Add missing GetType () overloads.
|
||||
|
||||
2010-02-04 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* TypeMirror.cs (EnumUnderlyingType): New property.
|
||||
|
||||
* EnumMirror.cs: Use it.
|
||||
|
||||
* VirtualMachine.cs (CreateEnumMirror): New method to create an EnumMirror.
|
||||
|
||||
* AppDomainMirror.cs (GetCorrespondingType): New method to return a TypeMirror
|
||||
corresponding to a primitive type.
|
||||
|
||||
* TypeMirror.cs (IsEnum): Implement.
|
||||
|
||||
* EnumMirror.cs (.ctor): New internal constructor called from CreateEnumMirror
|
||||
which does lots of error checking.
|
||||
|
||||
2010-01-28 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* AssemblyUnloadEvent: New file.
|
||||
|
||||
* VirtualMachine.cs Connection.cs: Add support for assembly unload events.
|
||||
|
||||
2009-12-05 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* StructMirror.cs: Fix field indexer for structs with static fields.
|
||||
* VirtualMachineManager.cs: Added an option to LaunchOptions which
|
||||
allows providing a custom method for launching the process. This
|
||||
allows launching mono in a wrapper process.
|
||||
|
||||
2009-12-03 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* StructMirror.cs (this): Ignore static fields.
|
||||
|
||||
2009-12-02 Geoff Norton <gnorton@novell.com>
|
||||
|
||||
* VirtualMachineManager.cs: We might get a SocketException (interrupted)
|
||||
here, so lets just handle all Exceptions to our Accept pattern the same
|
||||
way
|
||||
|
||||
2009-12-01 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachine.cs (ErrorHandler): Handle NOT_SUSPENDED error code too.
|
||||
|
||||
2009-11-24 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* ObjectMirror.cs TypeMirror.cs StructMirror.cs: Make the BeginInvokeMethod
|
||||
which takes a 'vm' argument obsolete, it was added by mistake, add a version
|
||||
without that argument instead.
|
||||
|
||||
2009-11-19 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* AssemblyMirror.cs: Add a GetName () method.
|
||||
|
||||
2009-11-17 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* Connection.cs ObjectMirror.cs: Implement invokes in a real asynchronous way,
|
||||
without waiting.
|
||||
|
||||
2009-11-14 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* InvokeOptions.cs: Add SingleThreaded option, not yet works.
|
||||
|
||||
* VirtualMachineManager.cs (Launch): Pass options to BeginLaunch.
|
||||
|
||||
* ObjectMirror.cs TypeMirror.cs StructMirror.cs: Implement an async version of
|
||||
InvokeMethod ().
|
||||
|
||||
2009-11-13 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* InvokeOptions.cs: New file.
|
||||
|
||||
* ObjectMirror.cs TypeMirror.cs StructMirror.cs: Add support for passing flags
|
||||
to InvokeMethod ().
|
||||
|
||||
* Connection.cs: Bump protocol version.
|
||||
|
||||
2009-11-12 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachineManager.cs: Put back the old Launch (string[], LaunchOptions)
|
||||
overload.
|
||||
|
||||
2009-11-11 Geoff Norton <gnorton@novell.com>
|
||||
|
||||
* VirtualMachineManager.cs: Refactor the APIs to have async methods.
|
||||
Remove a bunch of Listen overloads that are pointless. Refactor
|
||||
Launch to take a ProcessStartInfo instead of string arguments.
|
||||
|
||||
2009-11-10 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachineManager.cs (Launch): Close the listening socket instead of
|
||||
shutting it down since Shutdown throws on exception on non-connected sockets
|
||||
in ms.net.
|
||||
|
||||
2009-11-05 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* VirtualMachineManager.cs (Listen): Resurrect the old listen method.
|
||||
|
||||
* VirtualMachineManager.cs (Connect): New method to connect to a runtime
|
||||
listening at the provided address.
|
||||
|
||||
2009-11-04 Lluis Sanchez <lluis@novell.com>
|
||||
|
||||
* VirtualMachineManager.cs: Properly redirect standard output.
|
||||
|
||||
2009-11-03 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* EventRequest.cs (AssemblyFilter): New property to filter
|
||||
events based on a list of assemblies.
|
||||
|
||||
* Connection.cs: Add assembly filters to the protocol implementation.
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -133,7 +133,7 @@ namespace Mono.Debugger.Soft {
|
|||
if (named_args [j] == null)
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
res [i] = new CustomAttributeDataMirror (vm.GetMethod (attr.ctor_id), ctor_args, named_args);
|
||||
res [i] = new CustomAttributeDataMirror (ctor, ctor_args, named_args);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public class EventSet {
|
||||
protected VirtualMachine vm;
|
||||
SuspendPolicy suspend_policy;
|
||||
Event[] events;
|
||||
|
||||
internal EventSet (VirtualMachine vm, SuspendPolicy suspend_policy, Event[] events) {
|
||||
this.vm = vm;
|
||||
this.suspend_policy = suspend_policy;
|
||||
this.events = events;
|
||||
}
|
||||
|
||||
public SuspendPolicy SuspendPolicy {
|
||||
get {
|
||||
return suspend_policy;
|
||||
}
|
||||
}
|
||||
|
||||
public Event[] Events {
|
||||
get {
|
||||
return events;
|
||||
}
|
||||
}
|
||||
|
||||
public Event this [int index] {
|
||||
get {
|
||||
return Events [index];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,7 +17,16 @@ namespace Mono.Debugger.Soft
|
|||
Step = 11,
|
||||
TypeLoad = 12,
|
||||
Exception = 13,
|
||||
KeepAlive = 14,
|
||||
//
|
||||
// System.Diagnostics.Debugger.Break ()
|
||||
//
|
||||
UserBreak = 15,
|
||||
//
|
||||
// System.Diagnostics.Debugger.Log ()
|
||||
//
|
||||
UserLog = 16,
|
||||
// Not part of the wire protocol
|
||||
VMDisconnect = 99
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace Mono.Debugger.Soft
|
|||
TypeMirror type;
|
||||
FieldAttributes attrs;
|
||||
CustomAttributeDataMirror[] cattrs;
|
||||
C.FieldDefinition meta;
|
||||
|
||||
public FieldInfoMirror (TypeMirror parent, long id, string name, TypeMirror type, FieldAttributes attrs) : base (parent.VirtualMachine, id) {
|
||||
this.parent = parent;
|
||||
|
@ -142,7 +143,28 @@ namespace Mono.Debugger.Soft
|
|||
return GetCAttrs (attributeType, inherit);
|
||||
}
|
||||
|
||||
public C.FieldDefinition Metadata {
|
||||
get {
|
||||
if (parent.Metadata == null)
|
||||
return null;
|
||||
// FIXME: Speed this up
|
||||
foreach (var fd in parent.Metadata.Fields) {
|
||||
if (fd.Name == Name) {
|
||||
meta = fd;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (meta == null)
|
||||
/* Shouldn't happen */
|
||||
throw new NotImplementedException ();
|
||||
return meta;
|
||||
}
|
||||
}
|
||||
|
||||
CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
|
||||
if (cattrs == null && Metadata != null && !Metadata.HasCustomAttributes)
|
||||
cattrs = new CustomAttributeDataMirror [0];
|
||||
|
||||
// FIXME: Handle inherit
|
||||
if (cattrs == null) {
|
||||
CattrInfo[] info = vm.conn.Type_GetFieldCustomAttributes (DeclaringType.Id, id, 0, false);
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public enum ILExceptionHandlerType
|
||||
{
|
||||
Catch = ExceptionClauseFlags.None,
|
||||
Filter = ExceptionClauseFlags.Filter,
|
||||
Finally = ExceptionClauseFlags.Finally,
|
||||
Fault = ExceptionClauseFlags.Fault,
|
||||
}
|
||||
|
||||
public class ILExceptionHandler
|
||||
{
|
||||
public int TryOffset { get; internal set; }
|
||||
public int TryLength { get; internal set; }
|
||||
public ILExceptionHandlerType HandlerType { get; internal set; }
|
||||
public int HandlerOffset { get; internal set; }
|
||||
public int HandlerLength { get; internal set;}
|
||||
public int FilterOffset { get; internal set; }
|
||||
public TypeMirror CatchType { get; internal set; }
|
||||
|
||||
internal ILExceptionHandler (int try_offset, int try_length, ILExceptionHandlerType handler_type, int handler_offset, int handler_length)
|
||||
{
|
||||
TryOffset = try_offset;
|
||||
TryLength = try_length;
|
||||
HandlerType = handler_type;
|
||||
HandlerOffset = handler_offset;
|
||||
HandlerLength = handler_length;
|
||||
}
|
||||
}
|
||||
}
|
26
external/Mono.Debugger.Soft/Mono.Debugger.Soft/InterfaceMappingMirror.cs
поставляемый
Normal file
26
external/Mono.Debugger.Soft/Mono.Debugger.Soft/InterfaceMappingMirror.cs
поставляемый
Normal file
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using C = Mono.Cecil;
|
||||
using Mono.Cecil.Metadata;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public class InterfaceMappingMirror : Mirror {
|
||||
|
||||
internal InterfaceMappingMirror (VirtualMachine vm, TypeMirror target, TypeMirror iface, MethodMirror[] iface_methods, MethodMirror[] target_methods) : base (vm, 0) {
|
||||
TargetType = target;
|
||||
InterfaceType = iface;
|
||||
InterfaceMethods = iface_methods;
|
||||
TargetMethods = target_methods;
|
||||
}
|
||||
|
||||
public MethodMirror[] InterfaceMethods;
|
||||
|
||||
public TypeMirror InterfaceType;
|
||||
|
||||
public MethodMirror[] TargetMethods;
|
||||
|
||||
public TypeMirror TargetType;
|
||||
}
|
||||
}
|
|
@ -9,15 +9,17 @@ namespace Mono.Debugger.Soft
|
|||
int il_offset;
|
||||
string source_file;
|
||||
int line_number;
|
||||
//int column_number;
|
||||
byte[] hash;
|
||||
int column_number;
|
||||
|
||||
internal Location (VirtualMachine vm, MethodMirror method, long native_addr, int il_offset, string source_file, int line_number, int column_number) : base (vm, 0) {
|
||||
internal Location (VirtualMachine vm, MethodMirror method, long native_addr, int il_offset, string source_file, int line_number, int column_number, byte[] hash) : base (vm, 0) {
|
||||
this.method = method;
|
||||
//this.native_addr = native_addr;
|
||||
this.il_offset = il_offset;
|
||||
this.source_file = source_file;
|
||||
this.line_number = line_number;
|
||||
//this.column_number = column_number;
|
||||
this.hash = hash;
|
||||
this.column_number = column_number;
|
||||
}
|
||||
|
||||
public MethodMirror Method {
|
||||
|
@ -44,6 +46,21 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
// Since protocol version 2.19, 0 in earlier protocol versions
|
||||
public int ColumnNumber {
|
||||
get {
|
||||
return column_number;
|
||||
}
|
||||
}
|
||||
|
||||
// MD5 hash of source file
|
||||
// Since protocol version 2.14, null in earlier protocol versions
|
||||
public byte[] SourceFileHash {
|
||||
get {
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString () {
|
||||
return String.Format ("{0}+0x{1:x} at {2}:{3}", Method.FullName, ILOffset, SourceFile, LineNumber);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Text;
|
|||
using Mono.Cecil.Cil;
|
||||
using Mono.Cecil.Metadata;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
|
@ -11,11 +12,11 @@ namespace Mono.Debugger.Soft
|
|||
public class MethodBodyMirror : Mirror
|
||||
{
|
||||
MethodMirror method;
|
||||
byte[] il;
|
||||
MethodBodyInfo info;
|
||||
|
||||
internal MethodBodyMirror (VirtualMachine vm, MethodMirror method, byte[] il) : base (vm, 0) {
|
||||
internal MethodBodyMirror (VirtualMachine vm, MethodMirror method, MethodBodyInfo info) : base (vm, 0) {
|
||||
this.method = method;
|
||||
this.il = il;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public MethodMirror Method {
|
||||
|
@ -24,13 +25,29 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
public List<ILExceptionHandler> ExceptionHandlers {
|
||||
get {
|
||||
vm.CheckProtocolVersion (2, 18);
|
||||
return info.clauses.Select (c =>
|
||||
{
|
||||
var handler = new ILExceptionHandler (c.try_offset, c.try_length, (ILExceptionHandlerType) c.flags, c.handler_offset, c.handler_length);
|
||||
if (c.flags == ExceptionClauseFlags.None)
|
||||
handler.CatchType = vm.GetType (c.catch_type_id);
|
||||
else if (c.flags == ExceptionClauseFlags.Filter)
|
||||
handler.FilterOffset = c.filter_offset;
|
||||
|
||||
return handler;
|
||||
}).ToList ();
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] GetILAsByteArray () {
|
||||
return il;
|
||||
return info.il;
|
||||
}
|
||||
|
||||
public List<ILInstruction> Instructions {
|
||||
get {
|
||||
return ReadCilBody (new BinaryReader (new MemoryStream (il)), il.Length);
|
||||
return ReadCilBody (new BinaryReader (new MemoryStream (info.il)), info.il.Length);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,28 +122,23 @@ namespace Mono.Debugger.Soft
|
|||
instr.Operand = br.ReadByte ();
|
||||
break;
|
||||
case OperandType.ShortInlineVar :
|
||||
br.ReadByte ();
|
||||
//instr.Operand = GetVariable (body, br.ReadByte ());
|
||||
instr.Operand = br.ReadByte ();
|
||||
break;
|
||||
case OperandType.ShortInlineParam :
|
||||
br.ReadByte ();
|
||||
//instr.Operand = GetParameter (body, br.ReadByte ());
|
||||
case OperandType.ShortInlineArg :
|
||||
instr.Operand = br.ReadByte ();
|
||||
break;
|
||||
case OperandType.InlineSig :
|
||||
br.ReadInt32 ();
|
||||
//instr.Operand = GetCallSiteAt (br.ReadInt32 (), context);
|
||||
break;
|
||||
case OperandType.InlineI :
|
||||
br.ReadInt32 ();
|
||||
//instr.Operand = br.ReadInt32 ();
|
||||
instr.Operand = br.ReadInt32 ();
|
||||
break;
|
||||
case OperandType.InlineVar :
|
||||
br.ReadInt16 ();
|
||||
//instr.Operand = GetVariable (body, br.ReadInt16 ());
|
||||
instr.Operand = br.ReadInt16 ();
|
||||
break;
|
||||
case OperandType.InlineParam :
|
||||
br.ReadInt16 ();
|
||||
//instr.Operand = GetParameter (body, br.ReadInt16 ());
|
||||
case OperandType.InlineArg :
|
||||
instr.Operand = br.ReadInt16 ();
|
||||
break;
|
||||
case OperandType.InlineI8 :
|
||||
instr.Operand = br.ReadInt64 ();
|
||||
|
|
|
@ -14,11 +14,14 @@ namespace Mono.Debugger.Soft
|
|||
TypeMirror declaring_type;
|
||||
DebugInfo debug_info;
|
||||
C.MethodDefinition meta;
|
||||
CustomAttributeDataMirror[] cattrs;
|
||||
ParameterInfoMirror[] param_info;
|
||||
ParameterInfoMirror ret_param;
|
||||
LocalVariable[] locals;
|
||||
IList<Location> locations;
|
||||
MethodBodyMirror body;
|
||||
MethodMirror gmd;
|
||||
TypeMirror[] type_args;
|
||||
|
||||
internal MethodMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
|
@ -29,7 +32,7 @@ namespace Mono.Debugger.Soft
|
|||
name = vm.conn.Method_GetName (id);
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TypeMirror DeclaringType {
|
||||
get {
|
||||
|
@ -37,7 +40,7 @@ namespace Mono.Debugger.Soft
|
|||
declaring_type = vm.GetType (vm.conn.Method_GetDeclaringType (id));
|
||||
return declaring_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TypeMirror ReturnType {
|
||||
get {
|
||||
|
@ -53,30 +56,72 @@ namespace Mono.Debugger.Soft
|
|||
StringBuilder sb = new StringBuilder ();
|
||||
sb.Append (ReturnType.Name);
|
||||
sb.Append (' ');
|
||||
if (type_namespace == String.Empty)
|
||||
sb.Append (type_name + ":" + Name + " ()");
|
||||
else
|
||||
sb.Append (type_namespace + "." + type_name + ":" + Name + " ()");
|
||||
if (type_namespace != String.Empty)
|
||||
sb.Append (type_namespace + ".");
|
||||
sb.Append(type_name);
|
||||
sb.Append(":");
|
||||
sb.Append(Name);
|
||||
sb.Append(" ");
|
||||
sb.Append("(");
|
||||
for (var i = 0; i < param_info.Length; i++) {
|
||||
sb.Append(param_info[i].ParameterType.Name);
|
||||
if (i != param_info.Length - 1)
|
||||
sb.Append(", ");
|
||||
}
|
||||
sb.Append(")");
|
||||
return sb.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GetInfo () {
|
||||
/*
|
||||
* Creating the custom attributes themselves could modify the behavior of the
|
||||
* debuggee, so we return objects similar to the CustomAttributeData objects
|
||||
* used by the reflection-only functionality on .net.
|
||||
* Since protocol version 2.21
|
||||
*/
|
||||
public CustomAttributeDataMirror[] GetCustomAttributes (bool inherit) {
|
||||
return GetCAttrs (null, inherit);
|
||||
}
|
||||
|
||||
/* Since protocol version 2.21 */
|
||||
public CustomAttributeDataMirror[] GetCustomAttributes (TypeMirror attributeType, bool inherit) {
|
||||
if (attributeType == null)
|
||||
throw new ArgumentNullException ("attributeType");
|
||||
return GetCAttrs (attributeType, inherit);
|
||||
}
|
||||
|
||||
CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
|
||||
if (cattrs == null && meta != null && !Metadata.HasCustomAttributes)
|
||||
cattrs = new CustomAttributeDataMirror [0];
|
||||
|
||||
// FIXME: Handle inherit
|
||||
if (cattrs == null) {
|
||||
CattrInfo[] info = vm.conn.Method_GetCustomAttributes (id, 0, false);
|
||||
cattrs = CustomAttributeDataMirror.Create (vm, info);
|
||||
}
|
||||
var res = new List<CustomAttributeDataMirror> ();
|
||||
foreach (var attr in cattrs)
|
||||
if (type == null || attr.Constructor.DeclaringType == type)
|
||||
res.Add (attr);
|
||||
return res.ToArray ();
|
||||
}
|
||||
|
||||
MethodInfo GetInfo () {
|
||||
if (info == null)
|
||||
info = vm.conn.Method_GetInfo (id);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
public int MetadataToken {
|
||||
get {
|
||||
GetInfo ();
|
||||
return info.token;
|
||||
return GetInfo ().token;
|
||||
}
|
||||
}
|
||||
|
||||
public MethodAttributes Attributes {
|
||||
get {
|
||||
GetInfo ();
|
||||
return (MethodAttributes)info.attributes;
|
||||
return (MethodAttributes) GetInfo ().attributes;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +194,27 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
public ParameterInfoMirror[] GetParameters () {
|
||||
// Since protocol version 2.12
|
||||
public bool IsGenericMethodDefinition {
|
||||
get {
|
||||
vm.CheckProtocolVersion (2, 12);
|
||||
return GetInfo ().is_gmd;
|
||||
}
|
||||
}
|
||||
|
||||
// Since protocol version 2.12
|
||||
public bool IsGenericMethod {
|
||||
get {
|
||||
vm.CheckProtocolVersion (2, 12);
|
||||
return GetInfo ().is_generic_method;
|
||||
}
|
||||
}
|
||||
|
||||
public MethodImplAttributes GetMethodImplementationFlags() {
|
||||
return (MethodImplAttributes)GetInfo ().iattributes;
|
||||
}
|
||||
|
||||
public ParameterInfoMirror[] GetParameters () {
|
||||
if (param_info == null) {
|
||||
var pi = vm.conn.Method_GetParamInfo (id);
|
||||
param_info = new ParameterInfoMirror [pi.param_count];
|
||||
|
@ -165,7 +230,7 @@ namespace Mono.Debugger.Soft
|
|||
return param_info;
|
||||
}
|
||||
|
||||
public ParameterInfoMirror ReturnParameter {
|
||||
public ParameterInfoMirror ReturnParameter {
|
||||
get {
|
||||
if (ret_param == null)
|
||||
GetParameters ();
|
||||
|
@ -175,7 +240,13 @@ namespace Mono.Debugger.Soft
|
|||
|
||||
public LocalVariable[] GetLocals () {
|
||||
if (locals == null) {
|
||||
var li = vm.conn.Method_GetLocalsInfo (id);
|
||||
|
||||
LocalsInfo li = new LocalsInfo ();
|
||||
try {
|
||||
li = vm.conn.Method_GetLocalsInfo (id);
|
||||
} catch (CommandException) {
|
||||
throw new ArgumentException ("Method doesn't have a body.");
|
||||
}
|
||||
// Add the arguments as well
|
||||
var pi = vm.conn.Method_GetParamInfo (id);
|
||||
|
||||
|
@ -212,18 +283,36 @@ namespace Mono.Debugger.Soft
|
|||
if (body == null) {
|
||||
MethodBodyInfo info = vm.conn.Method_GetBody (id);
|
||||
|
||||
body = new MethodBodyMirror (vm, this, info.il);
|
||||
body = new MethodBodyMirror (vm, this, info);
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
public MethodMirror GetGenericMethodDefinition () {
|
||||
vm.CheckProtocolVersion (2, 12);
|
||||
if (gmd == null) {
|
||||
if (info.gmd == 0)
|
||||
throw new InvalidOperationException ();
|
||||
gmd = vm.GetMethod (info.gmd);
|
||||
}
|
||||
return gmd;
|
||||
}
|
||||
|
||||
// Since protocol version 2.15
|
||||
public TypeMirror[] GetGenericArguments () {
|
||||
vm.CheckProtocolVersion (2, 15);
|
||||
if (type_args == null)
|
||||
type_args = vm.GetTypes (GetInfo ().type_args);
|
||||
return type_args;
|
||||
}
|
||||
|
||||
public IList<int> ILOffsets {
|
||||
get {
|
||||
if (debug_info == null)
|
||||
debug_info = vm.conn.Method_GetDebugInfo (id);
|
||||
return Array.AsReadOnly (debug_info.il_offsets);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IList<int> LineNumbers {
|
||||
get {
|
||||
|
@ -231,15 +320,15 @@ namespace Mono.Debugger.Soft
|
|||
debug_info = vm.conn.Method_GetDebugInfo (id);
|
||||
return Array.AsReadOnly (debug_info.line_numbers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string SourceFile {
|
||||
get {
|
||||
if (debug_info == null)
|
||||
debug_info = vm.conn.Method_GetDebugInfo (id);
|
||||
return debug_info.filename;
|
||||
return debug_info.source_files.Length > 0 ? debug_info.source_files [0].source_file : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IList<Location> Locations {
|
||||
get {
|
||||
|
@ -248,24 +337,31 @@ namespace Mono.Debugger.Soft
|
|||
var line_numbers = LineNumbers;
|
||||
IList<Location> res = new Location [ILOffsets.Count];
|
||||
for (int i = 0; i < il_offsets.Count; ++i)
|
||||
res [i] = new Location (vm, this, -1, il_offsets [i], SourceFile, line_numbers [i], 0);
|
||||
res [i] = new Location (vm, this, -1, il_offsets [i], debug_info.source_files [i].source_file, line_numbers [i], debug_info.column_numbers [i], debug_info.source_files [i].hash);
|
||||
locations = res;
|
||||
}
|
||||
return locations;
|
||||
}
|
||||
}
|
||||
|
||||
internal int il_offset_to_line_number (int il_offset) {
|
||||
internal int il_offset_to_line_number (int il_offset, out string src_file, out byte[] src_hash, out int column_number) {
|
||||
if (debug_info == null)
|
||||
debug_info = vm.conn.Method_GetDebugInfo (id);
|
||||
|
||||
// FIXME: Optimize this
|
||||
src_file = null;
|
||||
src_hash = null;
|
||||
column_number = 0;
|
||||
for (int i = debug_info.il_offsets.Length - 1; i >= 0; --i) {
|
||||
if (debug_info.il_offsets [i] <= il_offset)
|
||||
if (debug_info.il_offsets [i] <= il_offset) {
|
||||
src_file = debug_info.source_files [i].source_file;
|
||||
src_hash = debug_info.source_files [i].hash;
|
||||
column_number = debug_info.column_numbers [i];
|
||||
return debug_info.line_numbers [i];
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public Location LocationAtILOffset (int il_offset) {
|
||||
IList<Location> locs = Locations;
|
||||
|
@ -282,9 +378,9 @@ namespace Mono.Debugger.Soft
|
|||
public C.MethodDefinition Metadata {
|
||||
get {
|
||||
if (meta == null)
|
||||
meta = (C.MethodDefinition)DeclaringType.Assembly.Metadata.MainModule.LookupByToken (new MetadataToken (MetadataToken));
|
||||
meta = (C.MethodDefinition)DeclaringType.Assembly.Metadata.MainModule.LookupToken (MetadataToken);
|
||||
return meta;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,19 +6,44 @@ using System.Threading;
|
|||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public class ObjectMirror : Value {
|
||||
TypeMirror type;
|
||||
AppDomainMirror domain;
|
||||
|
||||
internal ObjectMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
|
||||
internal ObjectMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id) {
|
||||
this.type = type;
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
void GetInfo () {
|
||||
var info = vm.conn.Object_GetInfo (id);
|
||||
type = vm.GetType (info.type_id);
|
||||
domain = vm.GetDomain (info.domain_id);
|
||||
}
|
||||
|
||||
public TypeMirror Type {
|
||||
get {
|
||||
return vm.GetType (vm.conn.Object_GetType (id));
|
||||
if (type == null) {
|
||||
if (vm.conn.Version.AtLeast (2, 5))
|
||||
GetInfo ();
|
||||
else
|
||||
type = vm.GetType (vm.conn.Object_GetType (id));
|
||||
}
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
public AppDomainMirror Domain {
|
||||
get {
|
||||
return vm.GetDomain (vm.conn.Object_GetDomain (id));
|
||||
if (domain == null) {
|
||||
if (vm.conn.Version.AtLeast (2, 5))
|
||||
GetInfo ();
|
||||
else
|
||||
domain = vm.GetDomain (vm.conn.Object_GetDomain (id));
|
||||
}
|
||||
return domain;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,6 +144,19 @@ namespace Mono.Debugger.Soft
|
|||
return EndInvokeMethodInternal (asyncResult);
|
||||
}
|
||||
|
||||
//
|
||||
// Invoke the members of METHODS one-by-one, calling CALLBACK after each invoke was finished. The IAsyncResult will be marked as completed after all invokes have
|
||||
// finished. The callback will be called with a different IAsyncResult that represents one method invocation.
|
||||
// From protocol version 2.22.
|
||||
//
|
||||
public IAsyncResult BeginInvokeMultiple (ThreadMirror thread, MethodMirror[] methods, IList<IList<Value>> arguments, InvokeOptions options, AsyncCallback callback, object state) {
|
||||
return BeginInvokeMultiple (vm, thread, methods, this, arguments, options, callback, state);
|
||||
}
|
||||
|
||||
public void EndInvokeMultiple (IAsyncResult asyncResult) {
|
||||
EndInvokeMultipleInternal (asyncResult);
|
||||
}
|
||||
|
||||
/*
|
||||
* Common implementation for invokes
|
||||
*/
|
||||
|
@ -171,6 +209,12 @@ namespace Mono.Debugger.Soft
|
|||
get; set;
|
||||
}
|
||||
|
||||
public bool IsMultiple {
|
||||
get; set;
|
||||
}
|
||||
|
||||
public int NumPending;
|
||||
|
||||
public void Abort ()
|
||||
{
|
||||
if (ID == 0) // Ooops
|
||||
|
@ -247,6 +291,16 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
internal static void EndInvokeMultipleInternal (IAsyncResult asyncResult) {
|
||||
if (asyncResult == null)
|
||||
throw new ArgumentNullException ("asyncResult");
|
||||
|
||||
InvokeAsyncResult r = (InvokeAsyncResult)asyncResult;
|
||||
|
||||
if (!r.IsCompleted)
|
||||
r.AsyncWaitHandle.WaitOne ();
|
||||
}
|
||||
|
||||
internal static Value InvokeMethod (VirtualMachine vm, ThreadMirror thread, MethodMirror method, Value this_obj, IList<Value> arguments, InvokeOptions options) {
|
||||
return EndInvokeMethodInternal (BeginInvokeMethod (vm, thread, method, this_obj, arguments, options, null, null));
|
||||
}
|
||||
|
@ -255,5 +309,72 @@ namespace Mono.Debugger.Soft
|
|||
{
|
||||
vm.conn.VM_AbortInvoke (thread.Id, id);
|
||||
}
|
||||
|
||||
//
|
||||
// Implementation of InvokeMultiple
|
||||
//
|
||||
|
||||
internal static IInvokeAsyncResult BeginInvokeMultiple (VirtualMachine vm, ThreadMirror thread, MethodMirror[] methods, Value this_obj, IList<IList<Value>> arguments, InvokeOptions options, AsyncCallback callback, object state) {
|
||||
if (thread == null)
|
||||
throw new ArgumentNullException ("thread");
|
||||
if (methods == null)
|
||||
throw new ArgumentNullException ("methods");
|
||||
foreach (var m in methods)
|
||||
if (m == null)
|
||||
throw new ArgumentNullException ("method");
|
||||
if (arguments == null) {
|
||||
arguments = new List<IList<Value>> ();
|
||||
for (int i = 0; i < methods.Length; ++i)
|
||||
arguments.Add (new Value [0]);
|
||||
} else {
|
||||
// FIXME: Not needed for property evaluation
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
if (callback == null)
|
||||
throw new ArgumentException ("A callback argument is required for this method.", "callback");
|
||||
|
||||
InvokeFlags f = InvokeFlags.NONE;
|
||||
|
||||
if ((options & InvokeOptions.DisableBreakpoints) != 0)
|
||||
f |= InvokeFlags.DISABLE_BREAKPOINTS;
|
||||
if ((options & InvokeOptions.SingleThreaded) != 0)
|
||||
f |= InvokeFlags.SINGLE_THREADED;
|
||||
|
||||
InvokeAsyncResult r = new InvokeAsyncResult { AsyncState = state, AsyncWaitHandle = new ManualResetEvent (false), VM = vm, Thread = thread, Callback = callback, NumPending = methods.Length, IsMultiple = true };
|
||||
|
||||
var mids = new long [methods.Length];
|
||||
for (int i = 0; i < methods.Length; ++i)
|
||||
mids [i] = methods [i].Id;
|
||||
var args = new List<ValueImpl[]> ();
|
||||
for (int i = 0; i < methods.Length; ++i)
|
||||
args.Add (vm.EncodeValues (arguments [i]));
|
||||
r.ID = vm.conn.VM_BeginInvokeMethods (thread.Id, mids, this_obj != null ? vm.EncodeValue (this_obj) : vm.EncodeValue (vm.CreateValue (null)), args, f, InvokeMultipleCB, r);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
// This is called when the result of an invoke is received
|
||||
static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) {
|
||||
var r = (InvokeAsyncResult)state;
|
||||
|
||||
Interlocked.Decrement (ref r.NumPending);
|
||||
|
||||
if (r.NumPending == 0) {
|
||||
r.IsCompleted = true;
|
||||
((ManualResetEvent)r.AsyncWaitHandle).Set ();
|
||||
}
|
||||
|
||||
// Have to pass another asyncresult to the callback since multiple threads can execute it concurrently with results of multiple invocations
|
||||
var r2 = new InvokeAsyncResult { AsyncState = r.AsyncState, AsyncWaitHandle = null, VM = r.VM, Thread = r.Thread, Callback = r.Callback, IsCompleted = true };
|
||||
|
||||
if (error != 0) {
|
||||
r2.ErrorCode = error;
|
||||
} else {
|
||||
r2.Value = v;
|
||||
r2.Exception = exc;
|
||||
}
|
||||
|
||||
r.Callback.BeginInvoke (r2, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
//
|
||||
// PointerValue.cs
|
||||
//
|
||||
// Author: Jeffrey Stedfast <jeff@xamarin.com>
|
||||
//
|
||||
// Copyright (c) 2012 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
/*
|
||||
* Represents a value of a pointer type in the debuggee
|
||||
*/
|
||||
public class PointerValue : Value {
|
||||
TypeMirror type;
|
||||
long addr;
|
||||
|
||||
public PointerValue (VirtualMachine vm, TypeMirror type, long addr) : base (vm, 0) {
|
||||
this.type = type;
|
||||
this.addr = addr;
|
||||
}
|
||||
|
||||
public long Address {
|
||||
get { return addr; }
|
||||
}
|
||||
|
||||
public TypeMirror Type {
|
||||
get { return type; }
|
||||
}
|
||||
|
||||
public override bool Equals (object obj) {
|
||||
if (obj != null && obj is PointerValue)
|
||||
return addr == (obj as PointerValue).addr;
|
||||
return base.Equals (obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode () {
|
||||
return base.GetHashCode ();
|
||||
}
|
||||
|
||||
public override string ToString () {
|
||||
return string.Format ("PointerValue<({0}) 0x{1:x}>", type.CSharpName, addr);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,6 @@ namespace Mono.Debugger.Soft
|
|||
* Represents a value of a primitive type in the debuggee
|
||||
*/
|
||||
public class PrimitiveValue : Value {
|
||||
|
||||
object value;
|
||||
|
||||
public PrimitiveValue (VirtualMachine vm, object value) : base (vm, 0) {
|
||||
|
@ -33,7 +32,25 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
|
||||
public override string ToString () {
|
||||
return "PrimitiveValue<" + Value + ">";
|
||||
object v = Value;
|
||||
|
||||
return "PrimitiveValue<" + (v != null ? v.ToString () : "(null)") + ">";
|
||||
}
|
||||
|
||||
public Value InvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {
|
||||
return ObjectMirror.InvokeMethod (vm, thread, method, this, arguments, InvokeOptions.None);
|
||||
}
|
||||
|
||||
public Value InvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options) {
|
||||
return ObjectMirror.InvokeMethod (vm, thread, method, this, arguments, options);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginInvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options, AsyncCallback callback, object state) {
|
||||
return ObjectMirror.BeginInvokeMethod (vm, thread, method, this, arguments, options, callback, state);
|
||||
}
|
||||
|
||||
public Value EndInvokeMethod (IAsyncResult asyncResult) {
|
||||
return ObjectMirror.EndInvokeMethodInternal (asyncResult);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,6 +14,7 @@ namespace Mono.Debugger.Soft
|
|||
PropertyAttributes attrs;
|
||||
MethodMirror get_method, set_method;
|
||||
CustomAttributeDataMirror[] cattrs;
|
||||
C.PropertyDefinition meta;
|
||||
|
||||
public PropertyInfoMirror (TypeMirror parent, long id, string name, MethodMirror get_method, MethodMirror set_method, PropertyAttributes attrs) : base (parent.VirtualMachine, id) {
|
||||
this.parent = parent;
|
||||
|
@ -90,6 +91,24 @@ namespace Mono.Debugger.Soft
|
|||
return new ParameterInfoMirror [0];
|
||||
}
|
||||
|
||||
public C.PropertyDefinition Metadata {
|
||||
get {
|
||||
if (parent.Metadata == null)
|
||||
return null;
|
||||
// FIXME: Speed this up
|
||||
foreach (var def in parent.Metadata.Properties) {
|
||||
if (def.Name == Name) {
|
||||
meta = def;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (meta == null)
|
||||
/* Shouldn't happen */
|
||||
throw new NotImplementedException ();
|
||||
return meta;
|
||||
}
|
||||
}
|
||||
|
||||
public CustomAttributeDataMirror[] GetCustomAttributes (bool inherit) {
|
||||
return GetCAttrs (null, inherit);
|
||||
}
|
||||
|
@ -101,6 +120,9 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
|
||||
CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
|
||||
if (cattrs == null && Metadata != null && !Metadata.HasCustomAttributes)
|
||||
cattrs = new CustomAttributeDataMirror [0];
|
||||
|
||||
// FIXME: Handle inherit
|
||||
if (cattrs == null) {
|
||||
CattrInfo[] info = vm.conn.Type_GetPropertyCustomAttributes (DeclaringType.Id, id, 0, false);
|
||||
|
|
|
@ -42,13 +42,16 @@ namespace Mono.Debugger.Soft
|
|||
get {
|
||||
if (location == null) {
|
||||
int line_number;
|
||||
string src_file = null;
|
||||
byte[] hash = null;
|
||||
int column_number = 0;
|
||||
|
||||
if (il_offset == -1)
|
||||
line_number = -1;
|
||||
else
|
||||
line_number = method.il_offset_to_line_number (il_offset);
|
||||
line_number = method.il_offset_to_line_number (il_offset, out src_file, out hash, out column_number);
|
||||
|
||||
location = new Location (vm, Method, 0, il_offset, method.SourceFile, line_number, 0);
|
||||
location = new Location (vm, Method, 0, il_offset, src_file != null ? src_file : method.SourceFile, line_number, column_number, hash);
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
@ -78,6 +81,16 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Whenever this frame transitions to native code. The method associated
|
||||
* with the frame is either an InternalCall or a pinvoke method.
|
||||
*/
|
||||
public bool IsNativeTransition {
|
||||
get {
|
||||
return (flags & StackFrameFlags.NATIVE_TRANSITION) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
public Value GetValue (ParameterInfoMirror param) {
|
||||
if (param == null)
|
||||
throw new ArgumentNullException ("param");
|
||||
|
|
|
@ -14,11 +14,23 @@ namespace Mono.Debugger.Soft
|
|||
Line = 1
|
||||
}
|
||||
|
||||
/*
|
||||
* Filter which kinds of methods to skip during single stepping
|
||||
*/
|
||||
public enum StepFilter {
|
||||
None = 0,
|
||||
StaticCtor = 1,
|
||||
/* Since protocol version 2.20 */
|
||||
/* Methods which have the [DebuggerHidden] attribute */
|
||||
DebuggerHidden = 2,
|
||||
}
|
||||
|
||||
public sealed class StepEventRequest : EventRequest {
|
||||
|
||||
ThreadMirror step_thread;
|
||||
StepDepth depth;
|
||||
StepSize size;
|
||||
StepFilter filter;
|
||||
|
||||
internal StepEventRequest (VirtualMachine vm, ThreadMirror thread) : base (vm, EventType.Step) {
|
||||
if (thread == null)
|
||||
|
@ -31,7 +43,7 @@ namespace Mono.Debugger.Soft
|
|||
|
||||
public override void Enable () {
|
||||
var mods = new List <Modifier> ();
|
||||
mods.Add (new StepModifier () { Thread = step_thread.Id, Depth = (int)Depth, Size = (int)Size });
|
||||
mods.Add (new StepModifier () { Thread = step_thread.Id, Depth = (int)Depth, Size = (int)Size, Filter = (int)Filter });
|
||||
SendReq (mods);
|
||||
}
|
||||
|
||||
|
@ -60,5 +72,15 @@ namespace Mono.Debugger.Soft
|
|||
size = value;
|
||||
}
|
||||
}
|
||||
|
||||
public StepFilter Filter {
|
||||
get {
|
||||
return filter;
|
||||
}
|
||||
set {
|
||||
CheckDisabled ();
|
||||
filter = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,14 @@ namespace Mono.Debugger.Soft
|
|||
{
|
||||
public class StringMirror : ObjectMirror {
|
||||
|
||||
int length;
|
||||
|
||||
internal StringMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
length = -1;
|
||||
}
|
||||
|
||||
internal StringMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) {
|
||||
length = -1;
|
||||
}
|
||||
|
||||
public string Value {
|
||||
|
@ -13,5 +20,24 @@ namespace Mono.Debugger.Soft
|
|||
return vm.conn.String_GetValue (id);
|
||||
}
|
||||
}
|
||||
|
||||
// Since protocol version 2.10
|
||||
public int Length {
|
||||
get {
|
||||
if (length == -1)
|
||||
length = vm.conn.String_GetLength (id);
|
||||
return length;
|
||||
}
|
||||
}
|
||||
|
||||
// Since protocol version 2.10
|
||||
public char[] GetChars (int index, int length) {
|
||||
// re-ordered to avoid possible integer overflow
|
||||
if (index > Length - length)
|
||||
throw new ArgumentException (Locale.GetText (
|
||||
"index and length do not specify a valid range in string."));
|
||||
|
||||
return vm.conn.String_GetChars (id, index, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
|
@ -10,18 +11,24 @@ namespace Mono.Debugger.Soft
|
|||
internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
|
||||
internal ThreadMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) {
|
||||
}
|
||||
|
||||
// FIXME: Cache, invalidate when the thread/runtime is resumed
|
||||
public StackFrame[] GetFrames () {
|
||||
FrameInfo[] frame_info = vm.conn.Thread_GetFrameInfo (id, 0, -1);
|
||||
|
||||
StackFrame[] frames = new StackFrame [frame_info.Length];
|
||||
var frames = new List<StackFrame> ();
|
||||
|
||||
for (int i = 0; i < frame_info.Length; ++i) {
|
||||
FrameInfo info = (FrameInfo)frame_info [i];
|
||||
MethodMirror method = vm.GetMethod (info.method);
|
||||
frames [i] = new StackFrame (vm, info.id, this, method, info.il_offset, info.flags);
|
||||
var f = new StackFrame (vm, info.id, this, method, info.il_offset, info.flags);
|
||||
if (!(f.IsNativeTransition && !NativeTransitions))
|
||||
frames.Add (f);
|
||||
}
|
||||
|
||||
return frames;
|
||||
return frames.ToArray ();
|
||||
}
|
||||
|
||||
public string Name {
|
||||
|
@ -52,14 +59,37 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
long? thread_id;
|
||||
/*
|
||||
* Return a unique identifier for this thread, multiple ThreadMirror objects
|
||||
* may have the same ThreadId because of appdomains.
|
||||
*/
|
||||
public long ThreadId {
|
||||
get {
|
||||
return vm.conn.Thread_GetId (id);
|
||||
if (thread_id == null)
|
||||
thread_id = vm.conn.Thread_GetId (id);
|
||||
return (long)thread_id;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the system thread id (TID) for this thread, this id is not unique since
|
||||
* a newly started thread might reuse a dead thread's id.
|
||||
*/
|
||||
public long TID {
|
||||
get {
|
||||
return vm.conn.Thread_GetTID (id);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get/set whenever GetFrames () should return frames for managed-to-native
|
||||
* transitions, i.e frames whose IsNativeTransition property is set.
|
||||
* This is needed because some clients might not be able to deal with those
|
||||
* frames.
|
||||
*/
|
||||
public static bool NativeTransitions {
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public sealed class TypeLoadEventRequest : EventRequest {
|
||||
string[] sourceFiles;
|
||||
string[] typeNames;
|
||||
|
||||
internal TypeLoadEventRequest (VirtualMachine vm) : base (vm, EventType.TypeLoad) {
|
||||
}
|
||||
|
||||
public string[] SourceFileFilter {
|
||||
get {
|
||||
return sourceFiles;
|
||||
}
|
||||
set {
|
||||
CheckDisabled ();
|
||||
sourceFiles = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string[] TypeNameFilter {
|
||||
get {
|
||||
return typeNames;
|
||||
}
|
||||
set {
|
||||
CheckDisabled ();
|
||||
typeNames = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Enable () {
|
||||
var mods = new List <Modifier> ();
|
||||
if (SourceFileFilter != null && SourceFileFilter.Length != 0)
|
||||
mods.Add (new SourceFileModifier () { SourceFiles = SourceFileFilter });
|
||||
if (TypeNameFilter != null && TypeNameFilter.Length != 0)
|
||||
mods.Add (new TypeNameModifier () { TypeNames = TypeNameFilter });
|
||||
SendReq (mods);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,9 +20,12 @@ namespace Mono.Debugger.Soft
|
|||
FieldInfoMirror[] fields;
|
||||
PropertyInfoMirror[] properties;
|
||||
TypeInfo info;
|
||||
TypeMirror base_type, element_type;
|
||||
TypeMirror base_type, element_type, gtd;
|
||||
TypeMirror[] nested;
|
||||
CustomAttributeDataMirror[] cattrs;
|
||||
TypeMirror[] ifaces;
|
||||
Dictionary<TypeMirror, InterfaceMappingMirror> iface_map;
|
||||
TypeMirror[] type_args;
|
||||
|
||||
internal const BindingFlags DefaultBindingFlags =
|
||||
BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
|
||||
|
@ -34,13 +37,13 @@ namespace Mono.Debugger.Soft
|
|||
get {
|
||||
return GetInfo ().name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Namespace {
|
||||
get {
|
||||
return GetInfo ().ns;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AssemblyMirror Assembly {
|
||||
get {
|
||||
|
@ -284,6 +287,25 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
// Since protocol version 2.12
|
||||
public bool IsGenericTypeDefinition {
|
||||
get {
|
||||
vm.CheckProtocolVersion (2, 12);
|
||||
GetInfo ();
|
||||
return info.is_gtd;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsGenericType {
|
||||
get {
|
||||
if (vm.Version.AtLeast (2, 12)) {
|
||||
return GetInfo ().is_generic_type;
|
||||
} else {
|
||||
return Name.IndexOf ('`') != -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TypeMirror GetElementType () {
|
||||
GetInfo ();
|
||||
if (element_type == null && info.element_type != 0)
|
||||
|
@ -291,6 +313,25 @@ namespace Mono.Debugger.Soft
|
|||
return element_type;
|
||||
}
|
||||
|
||||
public TypeMirror GetGenericTypeDefinition () {
|
||||
vm.CheckProtocolVersion (2, 12);
|
||||
GetInfo ();
|
||||
if (gtd == null) {
|
||||
if (info.gtd == 0)
|
||||
throw new InvalidOperationException ();
|
||||
gtd = vm.GetType (info.gtd);
|
||||
}
|
||||
return gtd;
|
||||
}
|
||||
|
||||
// Since protocol version 2.15
|
||||
public TypeMirror[] GetGenericArguments () {
|
||||
vm.CheckProtocolVersion (2, 15);
|
||||
if (type_args == null)
|
||||
type_args = vm.GetTypes (GetInfo ().type_args);
|
||||
return type_args;
|
||||
}
|
||||
|
||||
public string FullName {
|
||||
get {
|
||||
return GetInfo ().full_name;
|
||||
|
@ -442,7 +483,7 @@ namespace Mono.Debugger.Soft
|
|||
return GetValues (new FieldInfoMirror [] { field }) [0];
|
||||
}
|
||||
|
||||
public Value[] GetValues (IList<FieldInfoMirror> fields) {
|
||||
public Value[] GetValues (IList<FieldInfoMirror> fields, ThreadMirror thread) {
|
||||
if (fields == null)
|
||||
throw new ArgumentNullException ("fields");
|
||||
foreach (FieldInfoMirror f in fields) {
|
||||
|
@ -454,7 +495,7 @@ namespace Mono.Debugger.Soft
|
|||
for (int i = 0; i < fields.Count; ++i)
|
||||
ids [i] = fields [i].Id;
|
||||
try {
|
||||
return vm.DecodeValues (vm.conn.Type_GetValues (id, ids));
|
||||
return vm.DecodeValues (vm.conn.Type_GetValues (id, ids, thread != null ? thread.Id : 0));
|
||||
} catch (CommandException ex) {
|
||||
if (ex.ErrorCode == ErrorCode.INVALID_FIELDID)
|
||||
throw new ArgumentException ("One of the fields is not valid for this type.", "fields");
|
||||
|
@ -463,6 +504,20 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
public Value[] GetValues (IList<FieldInfoMirror> fields) {
|
||||
return GetValues (fields, null);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the value of the [ThreadStatic] field FIELD on the thread THREAD.
|
||||
*/
|
||||
public Value GetValue (FieldInfoMirror field, ThreadMirror thread) {
|
||||
if (thread == null)
|
||||
throw new ArgumentNullException ("thread");
|
||||
CheckMirror (thread);
|
||||
return GetValues (new FieldInfoMirror [] { field }, thread) [0];
|
||||
}
|
||||
|
||||
public void SetValues (IList<FieldInfoMirror> fields, Value[] values) {
|
||||
if (fields == null)
|
||||
throw new ArgumentNullException ("fields");
|
||||
|
@ -511,8 +566,18 @@ namespace Mono.Debugger.Soft
|
|||
return GetSourceFiles (false);
|
||||
}
|
||||
|
||||
string[] source_files;
|
||||
string[] source_files_full_path;
|
||||
public string[] GetSourceFiles (bool return_full_paths) {
|
||||
return vm.conn.Type_GetSourceFiles (id, return_full_paths);
|
||||
string[] res = return_full_paths ? source_files_full_path : source_files;
|
||||
if (res == null) {
|
||||
res = vm.conn.Type_GetSourceFiles (id, return_full_paths);
|
||||
if (return_full_paths)
|
||||
source_files_full_path = res;
|
||||
else
|
||||
source_files = res;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public C.TypeDefinition Metadata {
|
||||
|
@ -520,7 +585,7 @@ namespace Mono.Debugger.Soft
|
|||
if (meta == null) {
|
||||
if (Assembly.Metadata == null || MetadataToken == 0)
|
||||
return null;
|
||||
meta = (C.TypeDefinition)Assembly.Metadata.MainModule.LookupByToken (new MetadataToken (MetadataToken));
|
||||
meta = (C.TypeDefinition)Assembly.Metadata.MainModule.LookupToken (MetadataToken);
|
||||
}
|
||||
return meta;
|
||||
}
|
||||
|
@ -606,6 +671,9 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
|
||||
CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
|
||||
if (cattrs == null && Metadata != null && !Metadata.HasCustomAttributes)
|
||||
cattrs = new CustomAttributeDataMirror [0];
|
||||
|
||||
// FIXME: Handle inherit
|
||||
if (cattrs == null) {
|
||||
CattrInfo[] info = vm.conn.Type_GetCustomAttributes (id, 0, false);
|
||||
|
@ -618,6 +686,61 @@ namespace Mono.Debugger.Soft
|
|||
return res.ToArray ();
|
||||
}
|
||||
|
||||
public MethodMirror[] GetMethodsByNameFlags (string name, BindingFlags flags, bool ignoreCase) {
|
||||
if (vm.conn.Version.AtLeast (2, 6)) {
|
||||
long[] ids = vm.conn.Type_GetMethodsByNameFlags (id, name, (int)flags, ignoreCase);
|
||||
MethodMirror[] m = new MethodMirror [ids.Length];
|
||||
for (int i = 0; i < ids.Length; ++i)
|
||||
m [i] = vm.GetMethod (ids [i]);
|
||||
return m;
|
||||
} else {
|
||||
if ((flags & BindingFlags.IgnoreCase) != 0) {
|
||||
flags &= ~BindingFlags.IgnoreCase;
|
||||
ignoreCase = true;
|
||||
}
|
||||
|
||||
if (flags == BindingFlags.Default)
|
||||
flags = BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.Static;
|
||||
|
||||
MethodAttributes access = (MethodAttributes) 0;
|
||||
bool matchInstance = false;
|
||||
bool matchStatic = false;
|
||||
|
||||
if ((flags & BindingFlags.NonPublic) != 0) {
|
||||
access |= MethodAttributes.Private;
|
||||
flags &= ~BindingFlags.NonPublic;
|
||||
}
|
||||
if ((flags & BindingFlags.Public) != 0) {
|
||||
access |= MethodAttributes.Public;
|
||||
flags &= ~BindingFlags.Public;
|
||||
}
|
||||
if ((flags & BindingFlags.Instance) != 0) {
|
||||
flags &= ~BindingFlags.Instance;
|
||||
matchInstance = true;
|
||||
}
|
||||
if ((flags & BindingFlags.Static) != 0) {
|
||||
flags &= ~BindingFlags.Static;
|
||||
matchStatic = true;
|
||||
}
|
||||
|
||||
if ((int) flags != 0)
|
||||
throw new NotImplementedException ();
|
||||
|
||||
var res = new List<MethodMirror> ();
|
||||
foreach (MethodMirror m in GetMethods ()) {
|
||||
if ((m.Attributes & access) == (MethodAttributes) 0)
|
||||
continue;
|
||||
|
||||
if (!((matchStatic && m.IsStatic) || (matchInstance && !m.IsStatic)))
|
||||
continue;
|
||||
|
||||
if ((!ignoreCase && m.Name == name) || (ignoreCase && m.Name.Equals (name, StringComparison.CurrentCultureIgnoreCase)))
|
||||
res.Add (m);
|
||||
}
|
||||
return res.ToArray ();
|
||||
}
|
||||
}
|
||||
|
||||
public Value InvokeMethod (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {
|
||||
return ObjectMirror.InvokeMethod (vm, thread, method, null, arguments, InvokeOptions.None);
|
||||
}
|
||||
|
@ -645,6 +768,58 @@ namespace Mono.Debugger.Soft
|
|||
|
||||
public Value NewInstance (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options) {
|
||||
return ObjectMirror.InvokeMethod (vm, thread, method, null, arguments, options);
|
||||
}
|
||||
}
|
||||
|
||||
// Since protocol version 2.11
|
||||
public TypeMirror[] GetInterfaces () {
|
||||
if (ifaces == null)
|
||||
ifaces = vm.GetTypes (vm.conn.Type_GetInterfaces (id));
|
||||
return ifaces;
|
||||
}
|
||||
|
||||
// Since protocol version 2.11
|
||||
public InterfaceMappingMirror GetInterfaceMap (TypeMirror interfaceType) {
|
||||
if (interfaceType == null)
|
||||
throw new ArgumentNullException ("interfaceType");
|
||||
if (!interfaceType.IsInterface)
|
||||
throw new ArgumentException ("Argument must be an interface.", "interfaceType");
|
||||
if (IsInterface)
|
||||
throw new ArgumentException ("'this' type cannot be an interface itself");
|
||||
|
||||
if (iface_map == null) {
|
||||
// Query the info in bulk
|
||||
GetInterfaces ();
|
||||
var ids = new long [ifaces.Length];
|
||||
for (int i = 0; i < ifaces.Length; ++i)
|
||||
ids [i] = ifaces [i].Id;
|
||||
|
||||
var ifacemap = vm.conn.Type_GetInterfaceMap (id, ids);
|
||||
|
||||
var imap = new Dictionary<TypeMirror, InterfaceMappingMirror> ();
|
||||
for (int i = 0; i < ifacemap.Length; ++i) {
|
||||
IfaceMapInfo info = ifacemap [i];
|
||||
|
||||
MethodMirror[] imethods = new MethodMirror [info.iface_methods.Length];
|
||||
for (int j = 0; j < info.iface_methods.Length; ++j)
|
||||
imethods [j] = vm.GetMethod (info.iface_methods [j]);
|
||||
|
||||
MethodMirror[] tmethods = new MethodMirror [info.iface_methods.Length];
|
||||
for (int j = 0; j < info.target_methods.Length; ++j)
|
||||
tmethods [j] = vm.GetMethod (info.target_methods [j]);
|
||||
|
||||
InterfaceMappingMirror map = new InterfaceMappingMirror (vm, this, vm.GetType (info.iface_id), imethods, tmethods);
|
||||
|
||||
imap [map.InterfaceType] = map;
|
||||
}
|
||||
|
||||
iface_map = imap;
|
||||
}
|
||||
|
||||
InterfaceMappingMirror res;
|
||||
if (!iface_map.TryGetValue (interfaceType, out res))
|
||||
throw new ArgumentException ("Interface not found", "interfaceType");
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public class UserBreakEvent : Event {
|
||||
internal UserBreakEvent (VirtualMachine vm, int req_id, long thread_id) : base (EventType.UserBreak, vm, req_id, thread_id) {
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public class UserLogEvent : Event {
|
||||
|
||||
int level;
|
||||
string category, message;
|
||||
|
||||
internal UserLogEvent (VirtualMachine vm, int req_id, long thread_id, int level, string category, string message) : base (EventType.UserLog, vm, req_id, thread_id) {
|
||||
this.level = level;
|
||||
this.category = category;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int Level {
|
||||
get {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
||||
public string Category {
|
||||
get {
|
||||
return category;
|
||||
}
|
||||
}
|
||||
|
||||
public string Message {
|
||||
get {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -61,7 +61,10 @@ namespace Mono.Debugger.Soft
|
|||
|
||||
public EndPoint EndPoint {
|
||||
get {
|
||||
return conn.EndPoint;
|
||||
var tcpConn = conn as TcpConnection;
|
||||
if (tcpConn != null)
|
||||
return tcpConn.EndPoint;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,11 +74,23 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
EventSet current_es;
|
||||
int current_es_index;
|
||||
|
||||
/*
|
||||
* It is impossible to determine when to resume when using this method, since
|
||||
* the debuggee is suspended only once per event-set, not event.
|
||||
*/
|
||||
[Obsolete ("Use GetNextEventSet () instead")]
|
||||
public Event GetNextEvent () {
|
||||
lock (queue_monitor) {
|
||||
if (queue.Count == 0)
|
||||
Monitor.Wait (queue_monitor);
|
||||
return (Event)queue.Dequeue ();
|
||||
if (current_es == null || current_es_index == current_es.Events.Length) {
|
||||
if (queue.Count == 0)
|
||||
Monitor.Wait (queue_monitor);
|
||||
current_es = (EventSet)queue.Dequeue ();
|
||||
current_es_index = 0;
|
||||
}
|
||||
return current_es.Events [current_es_index ++];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,6 +98,19 @@ namespace Mono.Debugger.Soft
|
|||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public EventSet GetNextEventSet () {
|
||||
lock (queue_monitor) {
|
||||
if (queue.Count == 0)
|
||||
Monitor.Wait (queue_monitor);
|
||||
|
||||
current_es = null;
|
||||
current_es_index = 0;
|
||||
|
||||
return (EventSet)queue.Dequeue ();
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete ("Use GetNextEventSet () instead")]
|
||||
public T GetNextEvent<T> () where T : Event {
|
||||
return GetNextEvent () as T;
|
||||
}
|
||||
|
@ -106,9 +134,21 @@ namespace Mono.Debugger.Soft
|
|||
conn.VM_Exit (exitCode);
|
||||
}
|
||||
|
||||
public void Dispose () {
|
||||
public void Detach () {
|
||||
conn.VM_Dispose ();
|
||||
conn.Close ();
|
||||
notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null);
|
||||
}
|
||||
|
||||
[Obsolete ("This method was poorly named; use the Detach() method instead")]
|
||||
public void Dispose ()
|
||||
{
|
||||
Detach ();
|
||||
}
|
||||
|
||||
public void ForceDisconnect ()
|
||||
{
|
||||
conn.ForceDisconnect ();
|
||||
}
|
||||
|
||||
public IList<ThreadMirror> GetThreads () {
|
||||
|
@ -134,6 +174,16 @@ namespace Mono.Debugger.Soft
|
|||
return new EnumMirror (this, type, value);
|
||||
}
|
||||
|
||||
//
|
||||
// Enable send and receive timeouts on the connection and send a keepalive event
|
||||
// every 'keepalive_interval' milliseconds.
|
||||
//
|
||||
|
||||
public void SetSocketTimeouts (int send_timeout, int receive_timeout, int keepalive_interval)
|
||||
{
|
||||
conn.SetSocketTimeouts (send_timeout, receive_timeout, keepalive_interval);
|
||||
}
|
||||
|
||||
//
|
||||
// Methods to create event request objects
|
||||
//
|
||||
|
@ -168,9 +218,20 @@ namespace Mono.Debugger.Soft
|
|||
return new ExceptionEventRequest (this, exc_type, caught, uncaught);
|
||||
}
|
||||
|
||||
public AssemblyLoadEventRequest CreateAssemblyLoadRequest () {
|
||||
return new AssemblyLoadEventRequest (this);
|
||||
}
|
||||
|
||||
public TypeLoadEventRequest CreateTypeLoadRequest () {
|
||||
return new TypeLoadEventRequest (this);
|
||||
}
|
||||
|
||||
public void EnableEvents (params EventType[] events) {
|
||||
foreach (EventType etype in events)
|
||||
foreach (EventType etype in events) {
|
||||
if (etype == EventType.Breakpoint)
|
||||
throw new ArgumentException ("Breakpoint events cannot be requested using EnableEvents", "events");
|
||||
conn.EnableEvent (etype, SuspendPolicy.All, null);
|
||||
}
|
||||
}
|
||||
|
||||
public BreakpointEventRequest SetBreakpoint (MethodMirror method, long il_offset) {
|
||||
|
@ -188,10 +249,36 @@ namespace Mono.Debugger.Soft
|
|||
public void Disconnect () {
|
||||
conn.Close ();
|
||||
}
|
||||
|
||||
//
|
||||
// Return a list of TypeMirror objects for all loaded types which reference the
|
||||
// source file FNAME. Might return false positives.
|
||||
// Since protocol version 2.7.
|
||||
//
|
||||
public IList<TypeMirror> GetTypesForSourceFile (string fname, bool ignoreCase) {
|
||||
long[] ids = conn.VM_GetTypesForSourceFile (fname, ignoreCase);
|
||||
var res = new TypeMirror [ids.Length];
|
||||
for (int i = 0; i < ids.Length; ++i)
|
||||
res [i] = GetType (ids [i]);
|
||||
return res;
|
||||
}
|
||||
|
||||
//
|
||||
// Return a list of TypeMirror objects for all loaded types named 'NAME'.
|
||||
// NAME should be in the the same for as with Assembly.GetType ().
|
||||
// Since protocol version 2.9.
|
||||
//
|
||||
public IList<TypeMirror> GetTypes (string name, bool ignoreCase) {
|
||||
long[] ids = conn.VM_GetTypes (name, ignoreCase);
|
||||
var res = new TypeMirror [ids.Length];
|
||||
for (int i = 0; i < ids.Length; ++i)
|
||||
res [i] = GetType (ids [i]);
|
||||
return res;
|
||||
}
|
||||
|
||||
internal void queue_event (Event e) {
|
||||
internal void queue_event_set (EventSet es) {
|
||||
lock (queue_monitor) {
|
||||
queue.Enqueue (e);
|
||||
queue.Enqueue (es);
|
||||
Monitor.Pulse (queue_monitor);
|
||||
}
|
||||
}
|
||||
|
@ -208,6 +295,8 @@ namespace Mono.Debugger.Soft
|
|||
throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
|
||||
case ErrorCode.ABSENT_INFORMATION:
|
||||
throw new AbsentInformationException ();
|
||||
case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET:
|
||||
throw new ArgumentException ("Cannot set breakpoint on the specified IL offset.");
|
||||
default:
|
||||
throw new CommandException (args.ErrorCode);
|
||||
}
|
||||
|
@ -226,7 +315,7 @@ namespace Mono.Debugger.Soft
|
|||
root_domain = GetDomain (root_domain_id);
|
||||
}
|
||||
|
||||
internal void notify_vm_event (EventType evtype, int req_id, long thread_id, string vm_uri) {
|
||||
internal void notify_vm_event (EventType evtype, SuspendPolicy spolicy, int req_id, long thread_id, string vm_uri) {
|
||||
//Console.WriteLine ("Event: " + evtype + "(" + vm_uri + ")");
|
||||
|
||||
switch (evtype) {
|
||||
|
@ -235,13 +324,13 @@ namespace Mono.Debugger.Soft
|
|||
lock (startup_monitor) {
|
||||
Monitor.Pulse (startup_monitor);
|
||||
}
|
||||
queue_event (new VMStartEvent (vm, req_id, thread_id));
|
||||
queue_event_set (new EventSet (this, spolicy, new Event[] { new VMStartEvent (vm, req_id, thread_id) }));
|
||||
break;
|
||||
case EventType.VMDeath:
|
||||
queue_event (new VMDeathEvent (vm, req_id));
|
||||
queue_event_set (new EventSet (this, spolicy, new Event[] { new VMDeathEvent (vm, req_id) }));
|
||||
break;
|
||||
case EventType.VMDisconnect:
|
||||
queue_event (new VMDisconnectEvent (vm, req_id));
|
||||
queue_event_set (new EventSet (this, spolicy, new Event[] { new VMDisconnectEvent (vm, req_id) }));
|
||||
break;
|
||||
default:
|
||||
throw new Exception ();
|
||||
|
@ -367,6 +456,13 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
}
|
||||
|
||||
internal TypeMirror[] GetTypes (long[] ids) {
|
||||
var res = new TypeMirror [ids.Length];
|
||||
for (int i = 0; i < ids.Length; ++i)
|
||||
res [i] = GetType (ids [i]);
|
||||
return res;
|
||||
}
|
||||
|
||||
Dictionary <long, ObjectMirror> objects;
|
||||
object objects_lock = new object ();
|
||||
|
||||
|
@ -380,22 +476,29 @@ namespace Mono.Debugger.Soft
|
|||
* Obtain the domain/type of the object to determine the type of
|
||||
* object we need to create.
|
||||
*/
|
||||
if (domain_id == 0)
|
||||
domain_id = conn.Object_GetDomain (id);
|
||||
if (domain_id == 0 || type_id == 0) {
|
||||
if (conn.Version.AtLeast (2, 5)) {
|
||||
var info = conn.Object_GetInfo (id);
|
||||
domain_id = info.domain_id;
|
||||
type_id = info.type_id;
|
||||
} else {
|
||||
if (domain_id == 0)
|
||||
domain_id = conn.Object_GetDomain (id);
|
||||
if (type_id == 0)
|
||||
type_id = conn.Object_GetType (id);
|
||||
}
|
||||
}
|
||||
AppDomainMirror d = GetDomain (domain_id);
|
||||
|
||||
if (type_id == 0)
|
||||
type_id = conn.Object_GetType (id);
|
||||
TypeMirror t = GetType (type_id);
|
||||
|
||||
if (t.Assembly == d.Corlib && t.Namespace == "System.Threading" && t.Name == "Thread")
|
||||
obj = new ThreadMirror (this, id);
|
||||
obj = new ThreadMirror (this, id, t, d);
|
||||
else if (t.Assembly == d.Corlib && t.Namespace == "System" && t.Name == "String")
|
||||
obj = new StringMirror (this, id);
|
||||
obj = new StringMirror (this, id, t, d);
|
||||
else if (typeof (T) == typeof (ArrayMirror))
|
||||
obj = new ArrayMirror (this, id);
|
||||
obj = new ArrayMirror (this, id, t, d);
|
||||
else
|
||||
obj = new ObjectMirror (this, id);
|
||||
obj = new ObjectMirror (this, id, t, d);
|
||||
objects [id] = obj;
|
||||
}
|
||||
return (T)obj;
|
||||
|
@ -490,6 +593,11 @@ namespace Mono.Debugger.Soft
|
|||
res [i] = EncodeValue (values [i]);
|
||||
return res;
|
||||
}
|
||||
|
||||
internal void CheckProtocolVersion (int major, int minor) {
|
||||
if (!conn.Version.AtLeast (major, minor))
|
||||
throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
|
||||
}
|
||||
}
|
||||
|
||||
class EventHandler : MarshalByRefObject, IEventHandler
|
||||
|
@ -500,64 +608,76 @@ namespace Mono.Debugger.Soft
|
|||
this.vm = vm;
|
||||
}
|
||||
|
||||
public void VMStart (int req_id, long thread_id, string vm_uri) {
|
||||
vm.notify_vm_event (EventType.VMStart, req_id, thread_id, vm_uri);
|
||||
}
|
||||
public void Events (SuspendPolicy suspend_policy, EventInfo[] events) {
|
||||
var l = new List<Event> ();
|
||||
|
||||
public void VMDeath (int req_id, long thread_id, string vm_uri) {
|
||||
vm.notify_vm_event (EventType.VMDeath, req_id, thread_id, vm_uri);
|
||||
}
|
||||
for (int i = 0; i < events.Length; ++i) {
|
||||
EventInfo ei = events [i];
|
||||
int req_id = ei.ReqId;
|
||||
long thread_id = ei.ThreadId;
|
||||
long id = ei.Id;
|
||||
long loc = ei.Location;
|
||||
|
||||
switch (ei.EventType) {
|
||||
case EventType.VMStart:
|
||||
vm.notify_vm_event (EventType.VMStart, suspend_policy, req_id, thread_id, null);
|
||||
break;
|
||||
case EventType.VMDeath:
|
||||
vm.notify_vm_event (EventType.VMDeath, suspend_policy, req_id, thread_id, null);
|
||||
break;
|
||||
case EventType.ThreadStart:
|
||||
l.Add (new ThreadStartEvent (vm, req_id, id));
|
||||
break;
|
||||
case EventType.ThreadDeath:
|
||||
l.Add (new ThreadDeathEvent (vm, req_id, id));
|
||||
break;
|
||||
case EventType.AssemblyLoad:
|
||||
l.Add (new AssemblyLoadEvent (vm, req_id, thread_id, id));
|
||||
break;
|
||||
case EventType.AssemblyUnload:
|
||||
l.Add (new AssemblyUnloadEvent (vm, req_id, thread_id, id));
|
||||
break;
|
||||
case EventType.TypeLoad:
|
||||
l.Add (new TypeLoadEvent (vm, req_id, thread_id, id));
|
||||
break;
|
||||
case EventType.MethodEntry:
|
||||
l.Add (new MethodEntryEvent (vm, req_id, thread_id, id));
|
||||
break;
|
||||
case EventType.MethodExit:
|
||||
l.Add (new MethodExitEvent (vm, req_id, thread_id, id));
|
||||
break;
|
||||
case EventType.Breakpoint:
|
||||
l.Add (new BreakpointEvent (vm, req_id, thread_id, id, loc));
|
||||
break;
|
||||
case EventType.Step:
|
||||
l.Add (new StepEvent (vm, req_id, thread_id, id, loc));
|
||||
break;
|
||||
case EventType.Exception:
|
||||
l.Add (new ExceptionEvent (vm, req_id, thread_id, id, loc));
|
||||
break;
|
||||
case EventType.AppDomainCreate:
|
||||
l.Add (new AppDomainCreateEvent (vm, req_id, thread_id, id));
|
||||
break;
|
||||
case EventType.AppDomainUnload:
|
||||
l.Add (new AppDomainUnloadEvent (vm, req_id, thread_id, id));
|
||||
break;
|
||||
case EventType.UserBreak:
|
||||
l.Add (new UserBreakEvent (vm, req_id, thread_id));
|
||||
break;
|
||||
case EventType.UserLog:
|
||||
l.Add (new UserLogEvent (vm, req_id, thread_id, ei.Level, ei.Category, ei.Message));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (l.Count > 0)
|
||||
vm.queue_event_set (new EventSet (vm, suspend_policy, l.ToArray ()));
|
||||
}
|
||||
|
||||
public void VMDisconnect (int req_id, long thread_id, string vm_uri) {
|
||||
vm.notify_vm_event (EventType.VMDisconnect, req_id, thread_id, vm_uri);
|
||||
}
|
||||
|
||||
public void ThreadStart (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new ThreadStartEvent (vm, req_id, id));
|
||||
}
|
||||
|
||||
public void ThreadDeath (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new ThreadDeathEvent (vm, req_id, id));
|
||||
}
|
||||
|
||||
public void AssemblyLoad (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AssemblyLoadEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void AssemblyUnload (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AssemblyUnloadEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void TypeLoad (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new TypeLoadEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void MethodEntry (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new MethodEntryEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void MethodExit (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new MethodExitEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void Breakpoint (int req_id, long thread_id, long id, long loc) {
|
||||
vm.queue_event (new BreakpointEvent (vm, req_id, thread_id, id, loc));
|
||||
}
|
||||
|
||||
public void Step (int req_id, long thread_id, long id, long loc) {
|
||||
vm.queue_event (new StepEvent (vm, req_id, thread_id, id, loc));
|
||||
}
|
||||
|
||||
public void Exception (int req_id, long thread_id, long id, long loc) {
|
||||
vm.queue_event (new ExceptionEvent (vm, req_id, thread_id, id, loc));
|
||||
}
|
||||
|
||||
public void AppDomainCreate (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AppDomainCreateEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void AppDomainUnload (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AppDomainUnloadEvent (vm, req_id, thread_id, id));
|
||||
vm.notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, req_id, thread_id, vm_uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace Mono.Debugger.Soft
|
|||
throw;
|
||||
}
|
||||
|
||||
Connection conn = new Connection (accepted);
|
||||
Connection conn = new TcpConnection (accepted);
|
||||
|
||||
VirtualMachine vm = new VirtualMachine (p, conn);
|
||||
|
||||
|
@ -68,7 +68,13 @@ namespace Mono.Debugger.Soft
|
|||
return vm;
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginLaunch (ProcessStartInfo info, AsyncCallback callback, LaunchOptions options) {
|
||||
public static IAsyncResult BeginLaunch (ProcessStartInfo info, AsyncCallback callback)
|
||||
{
|
||||
return BeginLaunch (info, callback, null);
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginLaunch (ProcessStartInfo info, AsyncCallback callback, LaunchOptions options)
|
||||
{
|
||||
if (info == null)
|
||||
throw new ArgumentNullException ("info");
|
||||
|
||||
|
@ -111,16 +117,28 @@ namespace Mono.Debugger.Soft
|
|||
if (!asyncResult.IsCompleted)
|
||||
asyncResult.AsyncWaitHandle.WaitOne ();
|
||||
|
||||
AsyncResult async = (AsyncResult) asyncResult;
|
||||
LaunchCallback cb = (LaunchCallback) async.AsyncDelegate;
|
||||
AsyncResult result = (AsyncResult) asyncResult;
|
||||
LaunchCallback cb = (LaunchCallback) result.AsyncDelegate;
|
||||
return cb.EndInvoke (asyncResult);
|
||||
}
|
||||
|
||||
public static VirtualMachine Launch (ProcessStartInfo info, LaunchOptions options) {
|
||||
public static VirtualMachine Launch (ProcessStartInfo info)
|
||||
{
|
||||
return Launch (info, null);
|
||||
}
|
||||
|
||||
public static VirtualMachine Launch (ProcessStartInfo info, LaunchOptions options)
|
||||
{
|
||||
return EndLaunch (BeginLaunch (info, null, options));
|
||||
}
|
||||
|
||||
public static VirtualMachine Launch (string[] args, LaunchOptions options) {
|
||||
public static VirtualMachine Launch (string[] args)
|
||||
{
|
||||
return Launch (args, null);
|
||||
}
|
||||
|
||||
public static VirtualMachine Launch (string[] args, LaunchOptions options)
|
||||
{
|
||||
ProcessStartInfo pi = new ProcessStartInfo ("mono");
|
||||
pi.Arguments = String.Join (" ", args);
|
||||
|
||||
|
@ -155,7 +173,8 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
|
||||
if (con_sock != null) {
|
||||
con_sock.Disconnect (false);
|
||||
if (con_sock.Connected)
|
||||
con_sock.Disconnect (false);
|
||||
con_sock.Close ();
|
||||
}
|
||||
|
||||
|
@ -163,38 +182,40 @@ namespace Mono.Debugger.Soft
|
|||
dbg_sock.Disconnect (false);
|
||||
dbg_sock.Close ();
|
||||
|
||||
Connection conn = new Connection (dbg_acc);
|
||||
|
||||
VirtualMachine vm = new VirtualMachine (null, conn);
|
||||
|
||||
if (con_acc != null) {
|
||||
vm.StandardOutput = new StreamReader (new NetworkStream (con_acc));
|
||||
vm.StandardError = null;
|
||||
}
|
||||
|
||||
conn.EventHandler = new EventHandler (vm);
|
||||
|
||||
vm.connect ();
|
||||
|
||||
return vm;
|
||||
Connection transport = new TcpConnection (dbg_acc);
|
||||
StreamReader console = con_acc != null? new StreamReader (new NetworkStream (con_acc)) : null;
|
||||
|
||||
return Connect (transport, console, null);
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginListen (IPEndPoint dbg_ep, AsyncCallback callback) {
|
||||
return BeginListen (dbg_ep, null, callback);
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginListen (IPEndPoint dbg_ep, IPEndPoint con_ep, AsyncCallback callback)
|
||||
{
|
||||
int dbg_port, con_port;
|
||||
return BeginListen (dbg_ep, con_ep, callback, out dbg_port, out con_port);
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginListen (IPEndPoint dbg_ep, IPEndPoint con_ep, AsyncCallback callback) {
|
||||
public static IAsyncResult BeginListen (IPEndPoint dbg_ep, IPEndPoint con_ep, AsyncCallback callback,
|
||||
out int dbg_port, out int con_port)
|
||||
{
|
||||
dbg_port = con_port = 0;
|
||||
|
||||
Socket dbg_sock = null;
|
||||
Socket con_sock = null;
|
||||
|
||||
dbg_sock = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
dbg_sock.Bind (dbg_ep);
|
||||
dbg_sock.Listen (1000);
|
||||
dbg_port = ((IPEndPoint) dbg_sock.LocalEndPoint).Port;
|
||||
|
||||
if (con_ep != null) {
|
||||
con_sock = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
con_sock.Bind (con_ep);
|
||||
con_sock.Listen (1000);
|
||||
con_port = ((IPEndPoint) con_sock.LocalEndPoint).Port;
|
||||
}
|
||||
|
||||
ListenCallback c = new ListenCallback (ListenInternal);
|
||||
|
@ -208,12 +229,18 @@ namespace Mono.Debugger.Soft
|
|||
if (!asyncResult.IsCompleted)
|
||||
asyncResult.AsyncWaitHandle.WaitOne ();
|
||||
|
||||
AsyncResult async = (AsyncResult) asyncResult;
|
||||
ListenCallback cb = (ListenCallback) async.AsyncDelegate;
|
||||
AsyncResult result = (AsyncResult) asyncResult;
|
||||
ListenCallback cb = (ListenCallback) result.AsyncDelegate;
|
||||
return cb.EndInvoke (asyncResult);
|
||||
}
|
||||
|
||||
public static VirtualMachine Listen (IPEndPoint dbg_ep, IPEndPoint con_ep) {
|
||||
public static VirtualMachine Listen (IPEndPoint dbg_ep)
|
||||
{
|
||||
return Listen (dbg_ep, null);
|
||||
}
|
||||
|
||||
public static VirtualMachine Listen (IPEndPoint dbg_ep, IPEndPoint con_ep)
|
||||
{
|
||||
return EndListen (BeginListen (dbg_ep, con_ep, null));
|
||||
}
|
||||
|
||||
|
@ -253,21 +280,11 @@ namespace Mono.Debugger.Soft
|
|||
}
|
||||
throw;
|
||||
}
|
||||
|
||||
Connection conn = new Connection (dbg_sock);
|
||||
|
||||
VirtualMachine vm = new VirtualMachine (null, conn);
|
||||
|
||||
if (con_sock != null) {
|
||||
vm.StandardOutput = new StreamReader (new NetworkStream (con_sock));
|
||||
vm.StandardError = null;
|
||||
}
|
||||
|
||||
conn.EventHandler = new EventHandler (vm);
|
||||
|
||||
vm.connect ();
|
||||
|
||||
return vm;
|
||||
|
||||
Connection transport = new TcpConnection (dbg_sock);
|
||||
StreamReader console = con_sock != null? new StreamReader (new NetworkStream (con_sock)) : null;
|
||||
|
||||
return Connect (transport, console, null);
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginConnect (IPEndPoint dbg_ep, AsyncCallback callback) {
|
||||
|
@ -295,8 +312,8 @@ namespace Mono.Debugger.Soft
|
|||
if (!asyncResult.IsCompleted)
|
||||
asyncResult.AsyncWaitHandle.WaitOne ();
|
||||
|
||||
AsyncResult async = (AsyncResult) asyncResult;
|
||||
ConnectCallback cb = (ConnectCallback) async.AsyncDelegate;
|
||||
AsyncResult result = (AsyncResult) asyncResult;
|
||||
ConnectCallback cb = (ConnectCallback) result.AsyncDelegate;
|
||||
return cb.EndInvoke (asyncResult);
|
||||
}
|
||||
|
||||
|
@ -304,5 +321,19 @@ namespace Mono.Debugger.Soft
|
|||
{
|
||||
((Socket)asyncResult.AsyncState).Close ();
|
||||
}
|
||||
|
||||
public static VirtualMachine Connect (Connection transport, StreamReader standardOutput, StreamReader standardError)
|
||||
{
|
||||
VirtualMachine vm = new VirtualMachine (null, transport);
|
||||
|
||||
vm.StandardOutput = standardOutput;
|
||||
vm.StandardError = standardError;
|
||||
|
||||
transport.EventHandler = new EventHandler (vm);
|
||||
|
||||
vm.connect ();
|
||||
|
||||
return vm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
dtest.cs
|
|
@ -1,542 +0,0 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Net;
|
||||
using System.Diagnostics;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Cecil.Metadata;
|
||||
|
||||
namespace Mono.Debugger
|
||||
{
|
||||
public class VirtualMachine : Mirror
|
||||
{
|
||||
Queue queue;
|
||||
object queue_monitor;
|
||||
object startup_monitor;
|
||||
AppDomainMirror root_domain;
|
||||
Dictionary<int, EventRequest> requests;
|
||||
Process process;
|
||||
|
||||
internal Connection conn;
|
||||
|
||||
internal VirtualMachine (Process process, Connection conn) : base () {
|
||||
SetVirtualMachine (this);
|
||||
queue = new Queue ();
|
||||
queue_monitor = new Object ();
|
||||
startup_monitor = new Object ();
|
||||
requests = new Dictionary <int, EventRequest> ();
|
||||
this.conn = conn;
|
||||
this.process = process;
|
||||
conn.ErrorHandler += ErrorHandler;
|
||||
}
|
||||
|
||||
// The standard output of the process is available normally through Process
|
||||
public StreamReader StandardOutput { get; set; }
|
||||
public StreamReader StandardError { get; set; }
|
||||
|
||||
public Process Process {
|
||||
get {
|
||||
return process;
|
||||
}
|
||||
}
|
||||
|
||||
public AppDomainMirror RootDomain {
|
||||
get {
|
||||
return root_domain;
|
||||
}
|
||||
}
|
||||
|
||||
public EndPoint EndPoint {
|
||||
get {
|
||||
return conn.EndPoint;
|
||||
}
|
||||
}
|
||||
|
||||
public Event GetNextEvent () {
|
||||
lock (queue_monitor) {
|
||||
if (queue.Count == 0)
|
||||
Monitor.Wait (queue_monitor);
|
||||
return (Event)queue.Dequeue ();
|
||||
}
|
||||
}
|
||||
|
||||
public Event GetNextEvent (int timeout) {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public T GetNextEvent<T> () where T : Event {
|
||||
return GetNextEvent () as T;
|
||||
}
|
||||
|
||||
public void Suspend () {
|
||||
conn.VM_Suspend ();
|
||||
}
|
||||
|
||||
public void Resume () {
|
||||
try {
|
||||
conn.VM_Resume ();
|
||||
} catch (CommandException ex) {
|
||||
if (ex.ErrorCode == ErrorCode.NOT_SUSPENDED)
|
||||
throw new InvalidOperationException ("The vm is not suspended.");
|
||||
else
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public void Exit (int exitCode) {
|
||||
conn.VM_Exit (exitCode);
|
||||
}
|
||||
|
||||
public void Dispose () {
|
||||
conn.VM_Dispose ();
|
||||
conn.Close ();
|
||||
notify_vm_event (EventType.VMDisconnect, 0, 0, null);
|
||||
}
|
||||
|
||||
public IList<ThreadMirror> GetThreads () {
|
||||
long[] ids = vm.conn.VM_GetThreads ();
|
||||
ThreadMirror[] res = new ThreadMirror [ids.Length];
|
||||
for (int i = 0; i < ids.Length; ++i)
|
||||
res [i] = GetThread (ids [i]);
|
||||
return res;
|
||||
}
|
||||
|
||||
// Same as the mirrorOf methods in JDI
|
||||
public PrimitiveValue CreateValue (object value) {
|
||||
if (value == null)
|
||||
return new PrimitiveValue (vm, null);
|
||||
|
||||
if (!value.GetType ().IsPrimitive)
|
||||
throw new ArgumentException ("value must be of a primitive type instead of '" + value.GetType () + "'", "value");
|
||||
|
||||
return new PrimitiveValue (vm, value);
|
||||
}
|
||||
|
||||
//
|
||||
// Methods to create event request objects
|
||||
//
|
||||
public BreakpointEventRequest CreateBreakpointRequest (MethodMirror method, long il_offset) {
|
||||
return new BreakpointEventRequest (this, method, il_offset);
|
||||
}
|
||||
|
||||
public BreakpointEventRequest CreateBreakpointRequest (Location loc) {
|
||||
if (loc == null)
|
||||
throw new ArgumentNullException ("loc");
|
||||
CheckMirror (loc);
|
||||
return new BreakpointEventRequest (this, loc.Method, loc.ILOffset);
|
||||
}
|
||||
|
||||
public StepEventRequest CreateStepRequest (ThreadMirror thread) {
|
||||
return new StepEventRequest (this, thread);
|
||||
}
|
||||
|
||||
public MethodEntryEventRequest CreateMethodEntryRequest () {
|
||||
return new MethodEntryEventRequest (this);
|
||||
}
|
||||
|
||||
public MethodExitEventRequest CreateMethodExitRequest () {
|
||||
return new MethodExitEventRequest (this);
|
||||
}
|
||||
|
||||
public ExceptionEventRequest CreateExceptionRequest (TypeMirror exc_type) {
|
||||
return new ExceptionEventRequest (this, exc_type);
|
||||
}
|
||||
|
||||
public void EnableEvents (params EventType[] events) {
|
||||
foreach (EventType etype in events)
|
||||
conn.EnableEvent (etype, SuspendPolicy.All, null);
|
||||
}
|
||||
|
||||
public BreakpointEventRequest SetBreakpoint (MethodMirror method, long il_offset) {
|
||||
BreakpointEventRequest req = CreateBreakpointRequest (method, il_offset);
|
||||
|
||||
req.Enable ();
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
public void ClearAllBreakpoints () {
|
||||
conn.ClearAllBreakpoints ();
|
||||
}
|
||||
|
||||
internal void queue_event (Event e) {
|
||||
lock (queue_monitor) {
|
||||
queue.Enqueue (e);
|
||||
Monitor.Pulse (queue_monitor);
|
||||
}
|
||||
}
|
||||
|
||||
internal void ErrorHandler (object sender, ErrorHandlerEventArgs args) {
|
||||
switch (args.ErrorCode) {
|
||||
case ErrorCode.INVALID_OBJECT:
|
||||
throw new ObjectCollectedException ();
|
||||
case ErrorCode.INVALID_FRAMEID:
|
||||
throw new InvalidStackFrameException ();
|
||||
case ErrorCode.NOT_SUSPENDED:
|
||||
throw new InvalidOperationException ("The vm is not suspended.");
|
||||
default:
|
||||
throw new CommandException (args.ErrorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for the debuggee to start up and connect to it */
|
||||
internal void connect () {
|
||||
conn.Connect ();
|
||||
|
||||
// Test the connection
|
||||
VersionInfo ver = conn.Version;
|
||||
if ((ver.MajorVersion != Connection.MAJOR_VERSION) ||
|
||||
(ver.MinorVersion > Connection.MINOR_VERSION))
|
||||
throw new NotSupportedException (String.Format ("The debuggee implements protocol version {0}.{1}, while {2}.{3} is required.", ver.MajorVersion, ver.MinorVersion, Connection.MAJOR_VERSION, Connection.MINOR_VERSION));
|
||||
|
||||
long root_domain_id = conn.RootDomain;
|
||||
root_domain = GetDomain (root_domain_id);
|
||||
}
|
||||
|
||||
internal void notify_vm_event (EventType evtype, int req_id, long thread_id, string vm_uri) {
|
||||
//Console.WriteLine ("Event: " + evtype + "(" + vm_uri + ")");
|
||||
|
||||
switch (evtype) {
|
||||
case EventType.VMStart:
|
||||
/* Notify the main thread that the debuggee started up */
|
||||
lock (startup_monitor) {
|
||||
Monitor.Pulse (startup_monitor);
|
||||
}
|
||||
queue_event (new VMStartEvent (vm, req_id, thread_id));
|
||||
break;
|
||||
case EventType.VMDeath:
|
||||
queue_event (new VMDeathEvent (vm, req_id));
|
||||
break;
|
||||
case EventType.VMDisconnect:
|
||||
queue_event (new VMDisconnectEvent (vm, req_id));
|
||||
break;
|
||||
default:
|
||||
throw new Exception ();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods to create instances of mirror objects
|
||||
//
|
||||
|
||||
/*
|
||||
class MirrorCache<T> {
|
||||
static Dictionary <long, T> mirrors;
|
||||
static object mirror_lock = new object ();
|
||||
|
||||
internal static T GetMirror (VirtualMachine vm, long id) {
|
||||
lock (mirror_lock) {
|
||||
if (mirrors == null)
|
||||
mirrors = new Dictionary <long, T> ();
|
||||
T obj;
|
||||
if (!mirrors.TryGetValue (id, out obj)) {
|
||||
obj = CreateMirror (vm, id);
|
||||
mirrors [id] = obj;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
internal static T CreateMirror (VirtualMachine vm, long id) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// FIXME: When to remove items from the cache ?
|
||||
|
||||
Dictionary <long, MethodMirror> methods;
|
||||
object methods_lock = new object ();
|
||||
|
||||
internal MethodMirror GetMethod (long id) {
|
||||
lock (methods_lock) {
|
||||
if (methods == null)
|
||||
methods = new Dictionary <long, MethodMirror> ();
|
||||
MethodMirror obj;
|
||||
if (id == 0)
|
||||
return null;
|
||||
if (!methods.TryGetValue (id, out obj)) {
|
||||
obj = new MethodMirror (this, id);
|
||||
methods [id] = obj;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary <long, AssemblyMirror> assemblies;
|
||||
object assemblies_lock = new object ();
|
||||
|
||||
internal AssemblyMirror GetAssembly (long id) {
|
||||
lock (assemblies_lock) {
|
||||
if (assemblies == null)
|
||||
assemblies = new Dictionary <long, AssemblyMirror> ();
|
||||
AssemblyMirror obj;
|
||||
if (id == 0)
|
||||
return null;
|
||||
if (!assemblies.TryGetValue (id, out obj)) {
|
||||
obj = new AssemblyMirror (this, id);
|
||||
assemblies [id] = obj;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary <long, ModuleMirror> modules;
|
||||
object modules_lock = new object ();
|
||||
|
||||
internal ModuleMirror GetModule (long id) {
|
||||
lock (modules_lock) {
|
||||
if (modules == null)
|
||||
modules = new Dictionary <long, ModuleMirror> ();
|
||||
ModuleMirror obj;
|
||||
if (id == 0)
|
||||
return null;
|
||||
if (!modules.TryGetValue (id, out obj)) {
|
||||
obj = new ModuleMirror (this, id);
|
||||
modules [id] = obj;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary <long, AppDomainMirror> domains;
|
||||
object domains_lock = new object ();
|
||||
|
||||
internal AppDomainMirror GetDomain (long id) {
|
||||
lock (domains_lock) {
|
||||
if (domains == null)
|
||||
domains = new Dictionary <long, AppDomainMirror> ();
|
||||
AppDomainMirror obj;
|
||||
if (id == 0)
|
||||
return null;
|
||||
if (!domains.TryGetValue (id, out obj)) {
|
||||
obj = new AppDomainMirror (this, id);
|
||||
domains [id] = obj;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary <long, TypeMirror> types;
|
||||
object types_lock = new object ();
|
||||
|
||||
internal TypeMirror GetType (long id) {
|
||||
lock (types_lock) {
|
||||
if (types == null)
|
||||
types = new Dictionary <long, TypeMirror> ();
|
||||
TypeMirror obj;
|
||||
if (id == 0)
|
||||
return null;
|
||||
if (!types.TryGetValue (id, out obj)) {
|
||||
obj = new TypeMirror (this, id);
|
||||
types [id] = obj;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary <long, ObjectMirror> objects;
|
||||
object objects_lock = new object ();
|
||||
|
||||
internal T GetObject<T> (long id, long domain_id, long type_id) where T : ObjectMirror {
|
||||
lock (objects_lock) {
|
||||
if (objects == null)
|
||||
objects = new Dictionary <long, ObjectMirror> ();
|
||||
ObjectMirror obj;
|
||||
if (!objects.TryGetValue (id, out obj)) {
|
||||
/*
|
||||
* Obtain the domain/type of the object to determine the type of
|
||||
* object we need to create.
|
||||
*/
|
||||
if (domain_id == 0)
|
||||
domain_id = conn.Object_GetDomain (id);
|
||||
AppDomainMirror d = GetDomain (domain_id);
|
||||
|
||||
if (type_id == 0)
|
||||
type_id = conn.Object_GetType (id);
|
||||
TypeMirror t = GetType (type_id);
|
||||
|
||||
if (t.Assembly == d.Corlib && t.Namespace == "System.Threading" && t.Name == "Thread")
|
||||
obj = new ThreadMirror (this, id);
|
||||
else if (t.Assembly == d.Corlib && t.Namespace == "System" && t.Name == "String")
|
||||
obj = new StringMirror (this, id);
|
||||
else if (typeof (T) == typeof (ArrayMirror))
|
||||
obj = new ArrayMirror (this, id);
|
||||
else
|
||||
obj = new ObjectMirror (this, id);
|
||||
objects [id] = obj;
|
||||
}
|
||||
return (T)obj;
|
||||
}
|
||||
}
|
||||
|
||||
internal T GetObject<T> (long id) where T : ObjectMirror {
|
||||
return GetObject<T> (id, 0, 0);
|
||||
}
|
||||
|
||||
internal ObjectMirror GetObject (long objid) {
|
||||
return GetObject<ObjectMirror> (objid);
|
||||
}
|
||||
|
||||
internal ThreadMirror GetThread (long id) {
|
||||
return GetObject <ThreadMirror> (id);
|
||||
}
|
||||
|
||||
object requests_lock = new object ();
|
||||
|
||||
internal void AddRequest (EventRequest req, int id) {
|
||||
lock (requests_lock) {
|
||||
requests [id] = req;
|
||||
}
|
||||
}
|
||||
|
||||
internal void RemoveRequest (EventRequest req, int id) {
|
||||
lock (requests_lock) {
|
||||
requests.Remove (id);
|
||||
}
|
||||
}
|
||||
|
||||
internal EventRequest GetRequest (int id) {
|
||||
lock (requests_lock) {
|
||||
return requests [id];
|
||||
}
|
||||
}
|
||||
|
||||
internal Value DecodeValue (ValueImpl v) {
|
||||
if (v.Value != null)
|
||||
return new PrimitiveValue (this, v.Value);
|
||||
|
||||
switch (v.Type) {
|
||||
case ElementType.Void:
|
||||
return null;
|
||||
case ElementType.SzArray:
|
||||
case ElementType.Array:
|
||||
return GetObject<ArrayMirror> (v.Objid);
|
||||
case ElementType.String:
|
||||
return GetObject<StringMirror> (v.Objid);
|
||||
case ElementType.Class:
|
||||
case ElementType.Object:
|
||||
return GetObject (v.Objid);
|
||||
case ElementType.ValueType:
|
||||
if (v.IsEnum)
|
||||
return new EnumMirror (this, GetType (v.Klass), DecodeValues (v.Fields));
|
||||
else
|
||||
return new StructMirror (this, GetType (v.Klass), DecodeValues (v.Fields));
|
||||
case (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL:
|
||||
return new PrimitiveValue (this, null);
|
||||
default:
|
||||
throw new NotImplementedException ("" + v.Type);
|
||||
}
|
||||
}
|
||||
|
||||
internal Value[] DecodeValues (ValueImpl[] values) {
|
||||
Value[] res = new Value [values.Length];
|
||||
for (int i = 0; i < values.Length; ++i)
|
||||
res [i] = DecodeValue (values [i]);
|
||||
return res;
|
||||
}
|
||||
|
||||
internal ValueImpl EncodeValue (Value v) {
|
||||
if (v is PrimitiveValue) {
|
||||
object val = (v as PrimitiveValue).Value;
|
||||
if (val == null)
|
||||
return new ValueImpl { Type = (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL, Objid = 0 };
|
||||
else
|
||||
return new ValueImpl { Value = val };
|
||||
} else if (v is ObjectMirror) {
|
||||
return new ValueImpl { Type = ElementType.Object, Objid = (v as ObjectMirror).Id };
|
||||
} else if (v is StructMirror) {
|
||||
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
|
||||
} else {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal ValueImpl[] EncodeValues (IList<Value> values) {
|
||||
ValueImpl[] res = new ValueImpl [values.Count];
|
||||
for (int i = 0; i < values.Count; ++i)
|
||||
res [i] = EncodeValue (values [i]);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
class EventHandler : MarshalByRefObject, IEventHandler
|
||||
{
|
||||
VirtualMachine vm;
|
||||
|
||||
public EventHandler (VirtualMachine vm) {
|
||||
this.vm = vm;
|
||||
}
|
||||
|
||||
public void VMStart (int req_id, long thread_id, string vm_uri) {
|
||||
vm.notify_vm_event (EventType.VMStart, req_id, thread_id, vm_uri);
|
||||
}
|
||||
|
||||
public void VMDeath (int req_id, long thread_id, string vm_uri) {
|
||||
vm.notify_vm_event (EventType.VMDeath, req_id, thread_id, vm_uri);
|
||||
}
|
||||
|
||||
public void VMDisconnect (int req_id, long thread_id, string vm_uri) {
|
||||
vm.notify_vm_event (EventType.VMDisconnect, req_id, thread_id, vm_uri);
|
||||
}
|
||||
|
||||
public void ThreadStart (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new ThreadStartEvent (vm, req_id, id));
|
||||
}
|
||||
|
||||
public void ThreadDeath (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new ThreadDeathEvent (vm, req_id, id));
|
||||
}
|
||||
|
||||
public void AssemblyLoad (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AssemblyLoadEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void AssemblyUnload (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AssemblyUnloadEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void TypeLoad (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new TypeLoadEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void MethodEntry (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new MethodEntryEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void MethodExit (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new MethodExitEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void Breakpoint (int req_id, long thread_id, long id, long loc) {
|
||||
vm.queue_event (new BreakpointEvent (vm, req_id, thread_id, id, loc));
|
||||
}
|
||||
|
||||
public void Step (int req_id, long thread_id, long id, long loc) {
|
||||
vm.queue_event (new StepEvent (vm, req_id, thread_id, id, loc));
|
||||
}
|
||||
|
||||
public void Exception (int req_id, long thread_id, long id, long loc) {
|
||||
vm.queue_event (new ExceptionEvent (vm, req_id, thread_id, id, loc));
|
||||
}
|
||||
|
||||
public void AppDomainCreate (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AppDomainCreateEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
|
||||
public void AppDomainUnload (int req_id, long thread_id, long id) {
|
||||
vm.queue_event (new AppDomainUnloadEvent (vm, req_id, thread_id, id));
|
||||
}
|
||||
}
|
||||
|
||||
internal class CommandException : Exception {
|
||||
|
||||
public CommandException (ErrorCode error_code) : base ("Debuggee returned error code " + error_code + ".") {
|
||||
ErrorCode = error_code;
|
||||
}
|
||||
|
||||
public ErrorCode ErrorCode {
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
2010-06-17 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* dtest.cs: Add an EventSet test.
|
||||
|
||||
2010-06-15 Zoltan Varga <vargaz@gmail.com>
|
||||
|
||||
* dtest.cs dtest-app.cs: New files containing the soft debugger tests, moved here
|
||||
from mono/tests.
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,47 @@
|
|||
.assembly extern mscorlib
|
||||
{
|
||||
.ver 2:0:0:0
|
||||
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
|
||||
}
|
||||
.assembly 'dtest-lib' { }
|
||||
|
||||
.class public auto ansi ExceptionFilterTest
|
||||
extends [mscorlib]System.Object
|
||||
{
|
||||
.method public static void Main () cil managed
|
||||
{
|
||||
.entrypoint
|
||||
call void class ExceptionFilterTest::Test ()
|
||||
ret
|
||||
}
|
||||
|
||||
.method public static int32 Filter ([mscorlib]System.Exception exc) cil managed noinlining
|
||||
{
|
||||
ldc.i4.1
|
||||
ret
|
||||
}
|
||||
|
||||
.method public static void Handler ([mscorlib]System.Exception exc) cil managed noinlining
|
||||
{
|
||||
ret
|
||||
}
|
||||
|
||||
.method public static void Test () cil managed noinlining
|
||||
{
|
||||
.try {
|
||||
newobj instance void class [mscorlib]System.InvalidOperationException::.ctor ()
|
||||
throw
|
||||
|
||||
leave end
|
||||
} filter {
|
||||
call int32 class ExceptionFilterTest::Filter([mscorlib]System.Exception)
|
||||
endfilter
|
||||
} {
|
||||
call void class ExceptionFilterTest::Handler([mscorlib]System.Exception)
|
||||
leave end
|
||||
}
|
||||
|
||||
end:
|
||||
ret
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -92,7 +92,7 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="Mono.Cecil, Version=0.6.9.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\External\Mono\builds\monodistribution\lib\mono\2.0\Mono.Cecil.dll</HintPath>
|
||||
<HintPath>..\..\..\..\Tools\Mono.Cecil\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
|
|
Загрузка…
Ссылка в новой задаче