Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to ClrMD 1.0.2 #19

Merged
merged 1 commit into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 29 additions & 77 deletions ClrMD.Extensions/ClrMD.Extensions.csproj
Original file line number Diff line number Diff line change
@@ -1,81 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F8698C63-2681-4949-AB61-C33702F8F73A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClrMD.Extensions</RootNamespace>
<AssemblyName>ClrMD.Extensions</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkProfile />
<TargetFramework>netstandard2.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

<Title>ClrMD.Extensions (LINQ to Memory Dump)</Title>
<Description>Provides multiple ClrMD enhancements including LINQPad integration.</Description>
<PackageTags>clrmd</PackageTags>
<Version>1.0.0</Version>
<Authors>Jeff Cyr</Authors>
<Copyright>© Jeff Cyr</Copyright>
<PackageLicenseUrl>https://github.com/JeffCyr/ClrMD.Extensions/blob/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/JeffCyr/ClrMD.Extensions</PackageProjectUrl>
<RepositoryUrl>https://github.com/JeffCyr/ClrMD.Extensions</RepositoryUrl>

<PackageReleaseNotes>
- Upgraded to Microsoft.Diagnostics.Runtime 1.0.2
- Null display enhancements (#13)
- TypeName struct now supports array types properly (#14)
- Fixed type deobfuscation (#15)
</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Diagnostics.Runtime, Version=0.9.0.0, Culture=neutral, PublicKeyToken=4c5463f04c407af6, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Diagnostics.Runtime.0.9.180305.01\lib\net40\Microsoft.Diagnostics.Runtime.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="ClrMDExtensions.cs" />
<Compile Include="ClrMDSession.cs" />
<Compile Include="ClrDynamic.cs" />
<Compile Include="Core\ReadOnlySegmentedCollection.cs" />
<Compile Include="LINQPad\ICustomMemberProvider.cs" />
<Compile Include="LINQPad\LinqPadExtensions.cs" />
<Compile Include="Obfuscation\Deobfuscator.cs" />
<Compile Include="Obfuscation\DummyTypeDeobfuscator.cs" />
<Compile Include="Obfuscation\ITypeDeobfuscator.cs" />
<Compile Include="Obfuscation\ObfuscatedField.cs" />
<Compile Include="Obfuscation\ObfuscatedMethod.cs" />
<Compile Include="Obfuscation\TypeDeobfuscator.cs" />
<Compile Include="Obfuscation\TypeName.cs" />
<Compile Include="Obfuscation\TypeNameRegex.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Core\ReferenceMap.cs" />
<Compile Include="LINQPad\TypeVisualizer.cs" />
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="1.0.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
</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">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>

21 changes: 0 additions & 21 deletions ClrMD.Extensions/ClrMD.Extensions.nuspec

This file was deleted.

15 changes: 0 additions & 15 deletions ClrMD.Extensions/ClrMDSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ public static ClrMDSession LoadCrashDump(string dumpPath, string dacFile = null)

try
{
bool really64Bit = IsClrModule64Bit(target);

if (!really64Bit && target.Architecture == Architecture.Amd64)
throw new InvalidOperationException("Invalid dump file. The dump was taken from a process with the wrong architecture. (e.g. Creating a dump of a x86 process from the x64 taskmgr.exe)");

if (target.Architecture == Architecture.X86 && Environment.Is64BitProcess ||
target.Architecture == Architecture.Amd64 && !Environment.Is64BitProcess)
{
Expand All @@ -98,16 +93,6 @@ public static ClrMDSession LoadCrashDump(string dumpPath, string dacFile = null)
return new ClrMDSession(target, dacFile);
}

private static bool IsClrModule64Bit(DataTarget target)
{
var clrModule = target.EnumerateModules().FirstOrDefault(item => "clr.dll".Equals(Path.GetFileName(item.FileName), StringComparison.OrdinalIgnoreCase));

if (clrModule == null)
throw new InvalidOperationException("Unable to find clr.dll module in dump file.");

return clrModule.FileName.IndexOf("Framework64", StringComparison.OrdinalIgnoreCase) != -1;
}

public static ClrMDSession AttachToProcess(string processName, uint millisecondsTimeout = 5000, AttachFlag attachFlag = AttachFlag.Invasive)
{
Process p = Process.GetProcessesByName(processName).FirstOrDefault();
Expand Down
36 changes: 0 additions & 36 deletions ClrMD.Extensions/Properties/AssemblyInfo.cs

This file was deleted.

4 changes: 0 additions & 4 deletions ClrMD.Extensions/packages.config

This file was deleted.